A
Adrian
I have an Access 2000 system running a word 2000 mail
merge document via OLE. The first run of the
document is ok, the next run I get an invalid value error
when trying to access any of the PageSetup properties and
examining the property in the watch window shows a value
of 999999 ? Can anyone help ?
Code posted below
This is where I pick up the application object reference
oleReport.Verb = acOLEVerbOpen
oleReport.Action = acOLEActivate
Set wordobj = Me.oleReport.Object.Application
Then the pagesetup code is
wordobj.Documents(1).Activate
wordobj.Documents
(1).PageSetup.DifferentFirstPageHeaderFooter = True
wordobj.Documents(1).SectionStart = wdSectionContinuous
wordobj.Documents(1).Repaginate
The exact error message is "value out of range", error
number 4608
Thanks
merge document via OLE. The first run of the
document is ok, the next run I get an invalid value error
when trying to access any of the PageSetup properties and
examining the property in the watch window shows a value
of 999999 ? Can anyone help ?
Code posted below
This is where I pick up the application object reference
oleReport.Verb = acOLEVerbOpen
oleReport.Action = acOLEActivate
Set wordobj = Me.oleReport.Object.Application
Then the pagesetup code is
wordobj.Documents(1).Activate
wordobj.Documents
(1).PageSetup.DifferentFirstPageHeaderFooter = True
wordobj.Documents(1).SectionStart = wdSectionContinuous
wordobj.Documents(1).Repaginate
The exact error message is "value out of range", error
number 4608
Thanks