C
Craig Lindstrom
Our application is getting the 5852 error caused by Word Mail Merge trying to
run SQL. It's fixable by a registry edit, but we'll have new machines, AND,
frankly, I don't like that the registry edit opens up ALL SQL commands (is
that right?).
Yes, we're running Word XP, 2003 and 2007 - MS even shows registry edits for
2002, 2003, and 2007.
Can't I sign the macro (with a security certificate)? Isn't that a better
way? Shouldn't that be recomended in the knowledge base? Are the better
options to NOT doing a SQLSecurityCheck in Word?
Ok, here are the details:
The error is:
Run-time error '5852':
Requested object is not available.
as described at the bottom of
http://support.microsoft.com/kb/829121/en-us
"This error occurs because Word 2003 or Word 2007 displays a message box
when you try to open a Word 2003 mail merge document that is linked to a data
source. The default value is No, and Word 2003 or Word 2007 will not run the
SQL command.
However, if you open the mail merge document in code by using automation,
you have no opportunity to select Yes. The default value No is used.
Therefore, the SQL command does not run and you cannot gain access to the
data. To make the previous code sample run correctly, you must create the
following registry key for Word 2003:" ...
The workaround is described at:
http://support.microsoft.com/kb/825765/
Thanks!
Craig
run SQL. It's fixable by a registry edit, but we'll have new machines, AND,
frankly, I don't like that the registry edit opens up ALL SQL commands (is
that right?).
Yes, we're running Word XP, 2003 and 2007 - MS even shows registry edits for
2002, 2003, and 2007.
Can't I sign the macro (with a security certificate)? Isn't that a better
way? Shouldn't that be recomended in the knowledge base? Are the better
options to NOT doing a SQLSecurityCheck in Word?
Ok, here are the details:
The error is:
Run-time error '5852':
Requested object is not available.
as described at the bottom of
http://support.microsoft.com/kb/829121/en-us
"This error occurs because Word 2003 or Word 2007 displays a message box
when you try to open a Word 2003 mail merge document that is linked to a data
source. The default value is No, and Word 2003 or Word 2007 will not run the
SQL command.
However, if you open the mail merge document in code by using automation,
you have no opportunity to select Yes. The default value No is used.
Therefore, the SQL command does not run and you cannot gain access to the
data. To make the previous code sample run correctly, you must create the
following registry key for Word 2003:" ...
The workaround is described at:
http://support.microsoft.com/kb/825765/
Thanks!
Craig