Consulting

Results 1 to 5 of 5

Thread: Solved: Mail Merge - Prevent from showing SQL message

  1. #1
    VBAX Regular
    Joined
    Dec 2008
    Posts
    85
    Location

    Solved: Mail Merge - Prevent from showing SQL message

    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
    Last edited by Victor; 07-02-2009 at 10:10 AM.

  2. #2
    Quote Originally Posted by Victor
    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
    1. Start Registry Editor.
    2. Locate and then click the following registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options
    3. Click Edit, point to New, and then click DWORD Value.
    4. Under Name, type: SQLSecurityCheck
    5. Double-click SQLSecurityCheck.
    6. In the Value data box, type: 00000000
    7. Click OK

  3. #3
    VBAX Regular
    Joined
    Dec 2008
    Posts
    85
    Location
    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

  4. #4
    VBAX Regular
    Joined
    Dec 2008
    Posts
    85
    Location
    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...B;EN-US;825765
    Editing the Register apparently is the only solution.

    Thanks all for the help.

    Victor

  5. #5
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    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.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •