Has anyone else run into this (and found a reason/fix)?
On one of our five test dev machines, Word 2007 has a weird bug.
Start a blank new doc, go into the VBA macro editing area, add the
line:
options.printbackground=false
(on our machine, you can use ANY of the print options for this test -
printcomments, printbackgrounds, printdraft, etc.). they ALL fail...
but the non-print options are fine.)
If I try to run the macro, it breaks on that line with a runtime 4120
error bad parameter.
I've changed it to options.printbackground=true - still no go.
I've tried changing the default printer and restarting word. Still no
go.
Curiously, I can do a:
msgbox options.printbackground
and it will accurately read the value of the printbackground hckecbox
from the word options, advanced, printing section.
so... on this ONE machine, I can READ but not SET the options for
printing programmatically.
Any ideas??? Corrupt install??? Read only xml ini file or some other
obscure weirdness????
Regards.
MikeG - 01 Mar 2007 11:15 GMT
Hi Dmitri
I've got exactly the same problem on one of our test PCs.
As with you I can read the "options.UpdateFieldsAtPrint" setting but can not
change it without getting the "error 4120 bad parameter".
The same macro runs fine on various other machines using Word 2007.
The only difference I can find with the faulty machine is that it is running
Office 2007 Home and Student (on WinXP) where as the others are running
"full" versions of Office 2007 on either XP or Vista.
What version of Office are you getting the problem with?
> Has anyone else run into this (and found a reason/fix)?
> On one of our five test dev machines, Word 2007 has a weird bug.
[quoted text clipped - 22 lines]
> obscure weirdness????
> Regards.
Mary Mc - 21 Mar 2007 20:39 GMT
I, too, have the same problem at one of my clients' offices. Windows XP
Professional, Version 2002, Service Pack 2 and Word 2007 (12.0.4518.1014) MSO
(12.0.4518.1014).
Can't set any of the Options.
.UpdateFieldsAtPrint = True
.UpdateLinksAtPrint = False
.DefaultTray = "Use printer settings"
.PrintBackground = True
.PrintProperties = True
.PrintFieldCodes = True
.PrintComments = True
.PrintHiddenText = True
.PrintDrawingObjects = True
.PrintDraft = False
.PrintReverse = False
.MapPaperSize = True
Get the same error 4120, bad parameter.
I only care about three of them but they all fail.

Signature
Mary Mc
> Hi Dmitri
>
[quoted text clipped - 33 lines]
> > obscure weirdness????
> > Regards.
Mike Borozdin - 28 Mar 2007 02:04 GMT
We have hit the same issue. Interestingly enough Word 2007 on Vista works
fine and the same interop code works fine on Word 2003/XPSP2.
We are using .NET interop to print word documents in the background.
I am curious if there is a diagnostic dump of an office installation that
can help us compare the installation.
> Has anyone else run into this (and found a reason/fix)?
> On one of our five test dev machines, Word 2007 has a weird bug.
[quoted text clipped - 22 lines]
> obscure weirdness????
> Regards.