N
NeilL
I have a Word 2007 VB project that is working fine except on one customer XP
system.
On that system I'm getting several errors that I don't get anyplace else.
The first was an error 13 on the statement
If (Application.Version < 12) Then
I'm not sure why but changing it to
If (Application.Version < "12.0") Then
fixed that one on the customer system.
The one that I can not figure out at all is that I get a 4120 invalid
parameter error on the statement
oAa.Options.Pagination = savePag
The oAa is set to the Word application earlier and the savePag variable is
defined as Boolean and set earlier as in ...
Dim oAa as Object
Dim setpag as Boolean
set oAa = GetObject(, "Word.Application")
savepag = oAa.Options.Pagination
..... more code
oAa.Options.Pagination = savepag 'this fails
oAa.ScreenUpdating = True ' this also fails
I also (in debug on the customer machine) tried to set the value of the
pagination option to a value (False in my test) in the watch window and get
the same 4120 error so I don't think it is a code problem but something else.
I'm guessing there is some policy or permissions thing going on here that I
don't understand. I checked to make sure that the various trust items were
set to the directory where the dotm file lives and the dotm is even signed so
I'm totally stuck.
Any suggestions as to what might be going on here?
Thanks
system.
On that system I'm getting several errors that I don't get anyplace else.
The first was an error 13 on the statement
If (Application.Version < 12) Then
I'm not sure why but changing it to
If (Application.Version < "12.0") Then
fixed that one on the customer system.
The one that I can not figure out at all is that I get a 4120 invalid
parameter error on the statement
oAa.Options.Pagination = savePag
The oAa is set to the Word application earlier and the savePag variable is
defined as Boolean and set earlier as in ...
Dim oAa as Object
Dim setpag as Boolean
set oAa = GetObject(, "Word.Application")
savepag = oAa.Options.Pagination
..... more code
oAa.Options.Pagination = savepag 'this fails
oAa.ScreenUpdating = True ' this also fails
I also (in debug on the customer machine) tried to set the value of the
pagination option to a value (False in my test) in the watch window and get
the same 4120 error so I don't think it is a code problem but something else.
I'm guessing there is some policy or permissions thing going on here that I
don't understand. I checked to make sure that the various trust items were
set to the directory where the dotm file lives and the dotm is even signed so
I'm totally stuck.
Any suggestions as to what might be going on here?
Thanks