A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hide dialogs on mailmerge



 
 
Thread Tools Display Modes
  #1  
Old April 24th, 2006, 07:55 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Hide dialogs on mailmerge

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


  #2  
Old April 25th, 2006, 07:42 AM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Hide dialogs on mailmerge

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
...
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




  #3  
Old April 25th, 2006, 05:19 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Hide dialogs on mailmerge

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" wrote in message
...
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
...
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






  #4  
Old April 25th, 2006, 05:50 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default 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
...
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" wrote in message
...
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
...
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








  #5  
Old April 25th, 2006, 10:43 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Hide dialogs on mailmerge

Thanks for the help and direction, Peter. I will search your articles, as
you suggest.

st.

"Peter Jamieson" wrote in message
...
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
...
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" wrote in message
...
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
...
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










 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2003 how do I hide text in mailmerge labels w blank record? Scott Dever Mailmerge 1 April 22nd, 2006 10:14 AM
Question about Mailmerge Directory Blasting Cap Mailmerge 3 September 7th, 2005 04:57 AM
Hide duplicates off = OK; hide duplicates on = #name? C. Lombardo via AccessMonster.com Setting Up & Running Reports 0 April 28th, 2005 02:14 PM
Mailmerge Master for use with Excel database Graham General Discussion 2 February 12th, 2005 09:09 AM
adding mailmerge field in word 2000 document Karel Mailmerge 1 May 19th, 2004 10:05 AM


All times are GMT +1. The time now is 04:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.