Re: Hide dialogs on mailmerge



No, what I was saying is that for most types of connection, if the
connection info. in your OpenDataSource call is correct and complete then
the user shouldn't see prompts for either "Select Data Source", or the "Data
Link Dialog". Trouble is that in some circumstances Word pops up the OLEDB
Data Link dialog and/or the equivalent ODBC dialog if it doesn't think it
has enough info. to make the connection.

What kind of data source(s) are you trying to open, and what OpendDataSource
parameters are you passing?

(BTW if you search my articles in this NG via Google Groups or some such you
should find plenty of info. about this, though there is doubtless more to
know :-) )

Peter Jamieson

"zSplash" <zNOSPAMSplash@ gci.net> wrote in message
news:Od1Z3PIaGHA.1220@xxxxxxxxxxxxxxxxxxxxxxx
Thank you, Peter, for your help.

The system is very simple, so the method always work (hopefully (!)) --
(there's a built-in loop such that if there is not enough info, it loops
to
find it), so it ALWAYS has enough data to merge. I hear you saying
there's
no way to turn off the dialogs. (Rats!)

st.

"Peter Jamieson" <pjj@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OcMWoNDaGHA.4916@xxxxxxxxxxxxxxxxxxxxxxx
Not sure which particular problem you are encountering.

Is the DataSource dialog appearing when you execute the
ActiveDocument.MailMerge.DataSource.Name = ""
line (it doesn't here if there is no mail merge data source) or as a
result
of code in your MergeSetup routine?

I would say the main point is that once you call OpenDataSource, you are
at
the mercy of the method and if it chooses to display a dialog box, you
won't
be able to suppress it (except possibly by working directly with the
Windows
API). The only way to avoid that is to ensure that the method always
works,
i.e. the data source is always where you say it is, there are never any
"gotchas" opening it, and the OpenDataSOurce always provides enough info.
to
avoid the dialog. IMO that is in the general case impossible, not least
becasue with some types of data source, you can't avoid a dialog.

You may also need to look at the following KB article:

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document"

at

http://support.microsoft.com?kbid=825765

Peter Jamieson

"zSplash" <zNOSPAMSplash@ gci.net> wrote in message
news:ezNswC9ZGHA.5000@xxxxxxxxxxxxxxxxxxxxxxx
How do I hide the DataSource dialog and the Header dialog on mail
merge?

For example, when the following code runs, I don't want to see it:
If ActiveDocument.MailMerge.DataSource.Name = "" Then
MergeSetup
GoTo getDataSource
End If

TIA








.



Relevant Pages

  • Re: iexplore32b
    ... unistalling WinXP SP2 was a red Herring and a waste of time, ... Are you saying that you ran Adaware SE Personal Edition and Trend Sysclean, ... | My Norton worm detector did come up with this warning though and I chose to ... |> broadband connection Explorer and Outlook fail to recognise that I am logged ...
    (microsoft.public.windowsxp.general)
  • Re: Stupid Politicians
    ... So, I wonder where the connection is, or were you just being random? ... and figure it out what's wrong, they could do that retrospect very well. ... That's all what I was saying. ... life experience to support my argument. ...
    (rec.games.computer.ultima.dragons)
  • RE: Connection with Server error message
    ... >> error message through media player 10 saying a security update is requierd to ... >> play this file. ... >> message coems up saying a connection with the server cannot be established ...
    (microsoft.public.windowsmedia.player)
  • Re: How to use access query computed fields in Word mailmerge
    ... I have no idea why MS didn't document the SubType argument - for future ... > OpenDataSource it would have saved me uncountable work and grief. ... >> the connection and your users should not have to make it (unless you are ... >> Peter Jamieson ...
    (microsoft.public.word.mailmerge.fields)
  • Hacker or Virus???
    ... counting down from 1 minute, saying save all work, etc. ... minutes (this time the DSL connection wasn't logged on). ... Network Connections panel. ...
    (microsoft.public.windowsxp.security_admin)