![]() |
#1
|
|||
|
|||
![]()
I am trying to get a code that will open a data source for mail merge and let you choose which source and path you want at that time. I can get the macro to work referencing a specific path such as Name="C:mydocuments\personal\etc...." but I need one that will let me select from different saved files. Here is what I have currently:
Sub LOTO_PRINT_TAGS() ' ' LOTO_PRINT_TAGS Macro ' ' Dim sPath As String ActiveDocument.MailMerge.MainDocumentType = wdFormLetters ActiveDocument.MailMerge.OpenDataSource sPath ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle With ActiveDocument.MailMerge .Destination = wdSendToNewDocument .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=False End With End Sub |
Tags |
mail merge, vbs |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
billybeach | Outlook | 2 | 04-27-2013 04:38 AM |
Mail Merge Code (Default Display) | ochiha_ita | Mail Merge | 3 | 04-22-2013 04:04 AM |
![]() |
tonywatsonmail | Mail Merge | 4 | 04-27-2012 01:57 AM |
Mail Merge saved to single .pdf | treetop | Mail Merge | 1 | 08-10-2011 03:28 PM |
Mail merge Field Code Manipulation | macjnr | Mail Merge | 0 | 09-10-2009 11:37 AM |