Microsoft Office Tutorials and References
In Depth Information
Mail Merge: Displaying the Mail Merge Interface
Below is the edited version. Notice that all the information about passwords
can be deleted; they are irrelevant when opening a mail merge data source.
ActiveDocument.MailMerge.OpenDataSource _¶
Name:=Path, _¶
ConfirmConversions:=False, _¶
ReadOnly:=False, _¶
LinkToSource:=True, _¶
AddToRecentFiles:=False, _¶
Revert:=False, _¶
Format:=wdOpenFormatAuto, _¶
Connection:= _¶
"DSN=Excel Files;DBQ=Path;DriverId=790;MaxBufferSize=2048;PageTimeout=5;".
SQLStatement:="SELECT * FROM `Sheet1$`", _¶
SQLStatement1:="", SubType:=wdMergeSubTypeOther¶
Wrd
Mail Merge: Displaying the Mail Merge Interface
You can display the mail merge toolbar or wizard task pane automatically
when creating or opening a mail merge document using this procedure.
Example file:
W026
Scenario: For versions of Word up to and including Word
2000, the mail merge toolbar was automatically displayed
when opening a document linked to a data source. Since
Word 2002, this is no longer the case, which means there
is no longer any indication to the user that the document is
a mail merge document.
To display the desired interface, go through Tools | Letters
and Mailings. This simple little macro takes care of all that
for you.
View the Appendix to learn how to store this procedure
in a Standard module.
Option explicit¶
' * * * * *¶
Sub DisplayMergeUserInterface()¶
'If there is a data source attached¶
'to the document being opened¶
If ActiveDocument.MailMerge.MainDocumentType <> wdNotAMergeDocument
 
Search JabSto ::




Custom Search