PDA

View Full Version : Solved: Mail Merge - Prevent from showing SQL message



Victor
07-02-2009, 09:37 AM
Hi all:

I have four Word merge letters but for two of them I see this message, which I do not want to display:



Microsoft Word
Opening this document will run the following SQL command

select*From c:\users\ACESA\Documents\ACESA\ExportRTF\Fact.rtf

Data from your data base will be placed in this document. Do you want to continue?

Yes No


I tried the files in other two computers and the message is not show. I even installed again Microsof office professional 2003, without exit.

Any ideas to solve this probblem?

Thanks for the help.

Victor

Jootje_13
07-05-2009, 01:19 PM
Hi all:

I have four Word merge letters but for two of them I see this message, which I do not want to display:



I tried the files in other two computers and the message is not show. I even installed again Microsof office professional 2003, without exit.

Any ideas to solve this probblem?

Thanks for the help.

Victor

The solution is to edit the registry. On the support site from Microsoft search for kb article 825765. This is the solution:
Word 2003

loadTOCNode(2, 'workaround'); HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options

"SQLSecurityCheck"=dword:00000000

Start Registry Editor.
Locate and then click the following registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options
Click Edit, point to New, and then click DWORD Value.
Under Name, type: SQLSecurityCheck
Double-click SQLSecurityCheck.
In the Value data box, type: 00000000
Click OK

Victor
07-06-2009, 08:26 AM
Thats nice. But how about write a VBA Word instruction to prevent the alert(s) from display.

Is that possible? What is the instruction and where I write it.

Thanks for the help.

Victor

Victor
07-07-2009, 10:05 AM
The answer to my question is:



Jmas46
12-09-2005, 07:53 AM
For anybody that is interested.
"Note Setting DisplayAlerts=none through VBA suppresses the prompt when the file is opened by using VBA, but uses the NO option to open the document and no data is attached to the mail merge main document."

Looks like it can't be done unless one wants to "fiddle" with the registry.

http://support.microsoft.com/default.aspx?scid=KB;EN-US;825765



Editing the Register apparently is the only solution.

Thanks all for the help.

Victor

macropod
07-09-2009, 10:25 PM
Hi Victor,

You could use vba to update the Registry. Useful if the mailmerge process has to be used by others who might not have the registry chnages in place beforehand.