I have developed a software "printermonitor" using PrintQueuewatch dll. I also got a problem in page count for Microsoft word. To solve this error, I used to add registry key DWord"ForceSetCopyCount" for each version of Microsoft word and set value to 1. This trick will solve your problem permanently. See the below code:
Answers
I have developed a software "printermonitor" using PrintQueuewatch dll. I also got a problem in page count for Microsoft word. To solve this error, I used to add registry key DWord "ForceSetCopyCount" for each version of Microsoft word and set value to 1. This trick will solve your problem permanently. See the below code:
private void addReg()
{
Microsoft.Win32.RegistryKey subKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\11.0\Word\Options");
if (checkIfKeyExists(subKey))
{
RegistryKey keyx = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\11.0\Word\Options", true);
{
keyx.SetValue("ForceSetCopyCount", 1, RegistryValueKind.DWord);
keyx.Flush();
}
}
subKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\12.0\Word\Options");
if (checkIfKeyExists(subKey))
{
RegistryKey keyx = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\12.0\Word\Options", true);
{
keyx.SetValue("ForceSetCopyCount", 1, RegistryValueKind.DWord);
keyx.Flush();
}
}
subKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\14.0\Word\Options");
if (checkIfKeyExists(subKey))
{
RegistryKey keyx = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\14.0\Word\Options", true);
{
keyx.SetValue("ForceSetCopyCount", 1, RegistryValueKind.DWord);
keyx.Flush();
}
}
subKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\15.0\Word\Options");
if (checkIfKeyExists(subKey))
{
RegistryKey keyx = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Office\15.0\Word\Options", true);
{
keyx.SetValue("ForceSetCopyCount", 1, RegistryValueKind.DWord);
keyx.Flush();
}
}
}
Hope this helps
@pallav
November 25,2017 At 02:17 PM
Solution #1