Opening this will run the following SQL command

|

I tried to open one of our mailmerge documents that I wrote some time ago in Word2003 and got the message "Opening This Will Run the Following SQL Command". This is to prevent you sending data to a malicious user when opening a word macro and can be disabled by following the instructions in KB article 825765. What this doesn't explain is why my line

.Destination = wdSendToNewDocument
now comes back with a message "Run-time error 5852 Requested Object is not available". With Word2000 it comes up with a different error message, but on the same line.
Update It turns out this problem is caused by opening the document in word2003, changing a telephone number and then saving it again. I guess that whatever VBA is in office2003 doesn't like wdSendToNewDocument (or .Destination)
Update2 The fix is to create the registry entry as documented in Microsoft's KB 825765 and then edit the document. Thanks to the newsgroup posting>/a> which gave me the solution. No idea why the popup message should disable some word macro, but by putting that value in it worked!

Categories

Pages

Powered by Movable Type 4.1

About this Entry

This page contains a single entry by published on May 20, 2004 9:52 AM.

post sp4 hotfixes was the previous entry in this blog.

ICQ number change. is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.