Code launches Mail Merge but disables the Mail Merge

A

austris

I've got a Mail Merge doc based on .xls via DDE. When manually openeing
the file i need to confirm that the sql will be run. Now i've written a
code to launch the mail merge doc from Excel but the problem is that by
launching it this way the sql gets disabled (no warning appears - i'm
not getting prompted at all) and thus the Mail Merge gets disconnected
from the underlying .xls file... Any ideas how to keep the Mail Merge
running and connected to the .xls?

The code
Sub Open_MMerge()
Dim wrdApp As Word.Application
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
wrdApp.Documents.Open ("C:\Mail_merge.doc")
wrdApp.Activate
Set wrdApp = Nothing
End Sub


Thanks,

A.
 

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

Top