Mail Merge Error on A2003

  • Thread starter Thread starter Peter Hibbs
  • Start date Start date
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.
 
The Latter is the way

Create a Text File
Add

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Save as FixMailMerge.Reg

Double clicking the file will fix the registry key
Note:
you may have to zip it with a password to avoid anti-virus programs to
remove it from the e-mail

HTH

Pieter
 
Pieter

I did what you suggested but get the following error after confirming
that I want the file to update the Registry -

Cannot import C:\FixMailMerge.reg: The specified file is not a
registry script. You can only import binary registry files from within
the registry editor.

The text in the text file is :-

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000


What did I do wrong, any ideas. I have looked at the relevant section
of the Registry and there is nothing extra there (as you would
expect).

Peter.


The Latter is the way

Create a Text File
Add

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Save as FixMailMerge.Reg

Double clicking the file will fix the registry key
Note:
you may have to zip it with a password to avoid anti-virus programs to
remove it from the e-mail

HTH

Pieter


Peter Hibbs said:
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.
 
Mea culpa

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Pieter


Peter Hibbs said:
Pieter

I did what you suggested but get the following error after confirming
that I want the file to update the Registry -

Cannot import C:\FixMailMerge.reg: The specified file is not a
registry script. You can only import binary registry files from within
the registry editor.

The text in the text file is :-

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000


What did I do wrong, any ideas. I have looked at the relevant section
of the Registry and there is nothing extra there (as you would
expect).

Peter.


The Latter is the way

Create a Text File
Add

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Save as FixMailMerge.Reg

Double clicking the file will fix the registry key
Note:
you may have to zip it with a password to avoid anti-virus programs to
remove it from the e-mail

HTH

Pieter


Peter Hibbs said:
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.
 
Sorry Pieter

Still doesn't work, same error.

Should the SQLSecurityCheck bit be in double quotes, found some
similar examples on the Internet but did not want to risk trying that
until I am sure.

Any thoughts. I'll have another search tomorrow, it's getting late
here.

Thanks for your help.

Peter.

Mea culpa

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Pieter


Peter Hibbs said:
Pieter

I did what you suggested but get the following error after confirming
that I want the file to update the Registry -

Cannot import C:\FixMailMerge.reg: The specified file is not a
registry script. You can only import binary registry files from within
the registry editor.

The text in the text file is :-

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000


What did I do wrong, any ideas. I have looked at the relevant section
of the Registry and there is nothing extra there (as you would
expect).

Peter.


The Latter is the way

Create a Text File
Add

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Save as FixMailMerge.Reg

Double clicking the file will fix the registry key
Note:
you may have to zip it with a password to avoid anti-virus programs to
remove it from the e-mail

HTH

Pieter



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.
 
For anyone also looking for this fix the text should look like this :-

--------------------------------------------------------------------------------------
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

"SQLSecurityCheck"=dword:00000000
--------------------------------------------------------------------------------------

(without the dashes).

Peter Hibbs

Sorry Pieter

Still doesn't work, same error.

Should the SQLSecurityCheck bit be in double quotes, found some
similar examples on the Internet but did not want to risk trying that
until I am sure.

Any thoughts. I'll have another search tomorrow, it's getting late
here.

Thanks for your help.

Peter.

Mea culpa

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Pieter


Peter Hibbs said:
Pieter

I did what you suggested but get the following error after confirming
that I want the file to update the Registry -

Cannot import C:\FixMailMerge.reg: The specified file is not a
registry script. You can only import binary registry files from within
the registry editor.

The text in the text file is :-

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000


What did I do wrong, any ideas. I have looked at the relevant section
of the Registry and there is nothing extra there (as you would
expect).

Peter.


On Fri, 31 Aug 2007 13:21:45 +0200, "Pieter Wijnen"
<it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please@online.replace.with.norway>
wrote:

The Latter is the way

Create a Text File
Add

[REGEDT4]

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options]

SQLSecurityCheck=dword:00000000

Save as FixMailMerge.Reg

Double clicking the file will fix the registry key
Note:
you may have to zip it with a password to avoid anti-virus programs to
remove it from the e-mail

HTH

Pieter



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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top