Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / June 2004

Tip: Looking for answers? Try searching our database.

Mailing labels template with MailMerge automation and SQL VIEW

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ALPHA DAVIS - 28 Jun 2004 17:16 GMT
Hi,
I've created a Word template of mailing labels and the data source is a
SQL2000 view.  It's working just fine when I click on the Merge icon on the
menu.  I want the template to automatically merge the data source and crate
the labels when I double click on the file (not open to edit the template),
which creates a new document based on this template, without having to click
on the Merge icon on the menu.  I added the following VBA code but it is
still not merging automatically.  I appreciate some suggestion or help on
how to make this work.
p.s., what is a Main Document definition?  I think the State condition below
is verifying for a Main documetn.

Private Sub Document_New()
If ActiveDocument.MailMerge.State = wdMainAndDataSource Then
   ActiveDocument.MailMerge.Execute
End Sub
Cindy M  -WordMVP- - 29 Jun 2004 14:02 GMT
Replied to duplicate question posted in one of the word.vba
newsgroups.

   Cindy Meister

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.