P
Peter Hibbs
I am creating mail merge documents and opening them from VBA code
using the code below.
Set objWord = New Word.Application objWord.Visible = True
objWord.Documents.Open Filename:=txtFolder & "\" & lstDocs With
objWord.ActiveDocument.MailMerge
If .State = wdMainAndDataSource Or .State =
wdMainAndSourceAndHeader Then
... open merged document here, etc.
This code works fine on A2000 but fails at the If statement on A2003.
I believe this is due to extra security measures introduced by MS and
is explained in this article http://support.microsoft.com/kb/825765
To get around this, they suggest modifying the Registry which I am not
keen to do as this is for a client who is 200 miles away and who is
not technically proficient (although if this is the only way round it
then that is what they will have to do).
The question is does anyone know of any other way of opening mail
merge documents in code without having to make Registry modifications
(or maybe there is a way to make the Registry changes in code
automatically). My client and I are using WinXP.
Peter Hibbs.
using the code below.
Set objWord = New Word.Application objWord.Visible = True
objWord.Documents.Open Filename:=txtFolder & "\" & lstDocs With
objWord.ActiveDocument.MailMerge
If .State = wdMainAndDataSource Or .State =
wdMainAndSourceAndHeader Then
... open merged document here, etc.
This code works fine on A2000 but fails at the If statement on A2003.
I believe this is due to extra security measures introduced by MS and
is explained in this article http://support.microsoft.com/kb/825765
To get around this, they suggest modifying the Registry which I am not
keen to do as this is for a client who is 200 miles away and who is
not technically proficient (although if this is the only way round it
then that is what they will have to do).
The question is does anyone know of any other way of opening mail
merge documents in code without having to make Registry modifications
(or maybe there is a way to make the Registry changes in code
automatically). My client and I are using WinXP.
Peter Hibbs.