G
Gabriele Nazeri
Hello.
I need to prevent the "select data source" dialog from displaying when I
open a mailmerge document from my code. It doesn't matter if it's VB, VCS or
VC++.
For example, I have a word document that is connected to an Excel data
source. When I open the file with something like "wrdApp.Documents.Open" it
shows the dialog, while I need it to be fully automated. At the moment I
noticed that I can make it work by "simulating" escape key by trapping the
dialog window and sending a WM_KEY message. But I think this is a bad
approach (I have to check the window caption and obviously it doesn't work if
I check for the caption in a language different from that in which Office is
installed).
I tried to record a macro when opening a mailmerge file but it shows nothing
useful (only "ChangFileDirectory" actually).
Anyone who can help me? Thanks a lot and sorry if I wrote too much.
Gabriele.
I need to prevent the "select data source" dialog from displaying when I
open a mailmerge document from my code. It doesn't matter if it's VB, VCS or
VC++.
For example, I have a word document that is connected to an Excel data
source. When I open the file with something like "wrdApp.Documents.Open" it
shows the dialog, while I need it to be fully automated. At the moment I
noticed that I can make it work by "simulating" escape key by trapping the
dialog window and sending a WM_KEY message. But I think this is a bad
approach (I have to check the window caption and obviously it doesn't work if
I check for the caption in a language different from that in which Office is
installed).
I tried to record a macro when opening a mailmerge file but it shows nothing
useful (only "ChangFileDirectory" actually).
Anyone who can help me? Thanks a lot and sorry if I wrote too much.
Gabriele.