#1
|
|||
|
|||
Merge to New Document - saved letter continues to ask for SQL source
I am using the Merge to New document button for a mail merge document and saving the letter with a name such as ABC.doc.
I need to save legal documents based on templates that can be opened at a later time for reference. The information in my Access table data source for my mail merge template changes. So, if I have saved merged information one day, it will be different the next time I use the template. When I open my saved letters (merged documents), I am prompted to open the SQL source. I thought merging to a new document would simply save the document with the data in it and not prompt me for the data source when I open that saved document? Do you know how I can stop this prompt? If I answer the prompt for the SQL source with Yes or No, it does open up my saved document with the data that I expect so it is not truly linking back to the data source because if it did, there would be new information in the saved letter each time. Thank you. Brandi |
#2
|
|||
|
|||
Code:
Sub MergePetition() Documents.Add Template:= _ "C:\Bergemann\Forfeiture\WordMailMerge\Petition.dot" _ , NewTemplate:=False, DocumentType:=0 With ActiveDocument.MailMerge .Destination = wdSendToNewDocument .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=False End With With ActiveDocument .AttachedTemplate = "C:\YourPathToTheNormalTemplate\Normal.dot" End With End Sub |
#3
|
|||
|
|||
Oh yeah, I forgot you are also having a problem with .Destination, so change the macro to this instead:
Code:
Sub MergePetition() Documents.Add Template:= _ "C:\Bergemann\Forfeiture\WordMailMerge\Petition.dot" _ , NewTemplate:=False, DocumentType:=0 With ActiveDocument.MailMerge .Destination = 0 .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=False End With With ActiveDocument .AttachedTemplate = "C:\YourPathToTheNormalTemplate\Normal.dot" End With End Sub Last edited by Kimberly; 06-16-2010 at 08:10 AM. Reason: clarification |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lost Word Document and cant find it!!! I saved it but it ISNT there!! | APAV | Word | 9 | 10-09-2017 01:17 PM |
Outlook continues to run after I close it | Shawn76 | Outlook | 1 | 08-23-2010 12:30 AM |
Mail Merge data source on network drive | Brandi | Mail Merge | 0 | 06-13-2010 11:26 AM |
Auto Letter | Hannes | Word | 1 | 10-29-2009 06:27 AM |
Letter Templates | happymouth | Word | 8 | 05-17-2009 02:43 AM |