W
Worksmart
I’m using Word 2003 and am not a programmer. The macro below automates mail
merge requests. When I need to choose which document to merge, I’d like to
always go to the same folder (the merge fields are already in the document).
**This is the path to the folder
c:/Documents/My Documents/My
Business/1Consultancy/Training/Seminars/InPerson/Courses/Computer Magic/Class
Samples/Training Forms/Event Forms_Word
**This is the code I’m using. How can I set this up to always go to the same
folder Event Forms_Word? Thanks in advance.
Private Sub CommandButton1_Click()
' Events_Document Macro
' Macro recorded 5/11/2008 by Peggy Duncan
'
If MsgBox(Prompt:="Are You Sure?", Buttons:=vbYesNo + vbQuestion, _
Title:="Mail Merge Document") = vbNo Then
Exit Sub
End If
Dialogs(wdDialogFileOpen).Show
Dialogs(wdDialogMailMergeRecipients).Display
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
End Sub
merge requests. When I need to choose which document to merge, I’d like to
always go to the same folder (the merge fields are already in the document).
**This is the path to the folder
c:/Documents/My Documents/My
Business/1Consultancy/Training/Seminars/InPerson/Courses/Computer Magic/Class
Samples/Training Forms/Event Forms_Word
**This is the code I’m using. How can I set this up to always go to the same
folder Event Forms_Word? Thanks in advance.
Private Sub CommandButton1_Click()
' Events_Document Macro
' Macro recorded 5/11/2008 by Peggy Duncan
'
If MsgBox(Prompt:="Are You Sure?", Buttons:=vbYesNo + vbQuestion, _
Title:="Mail Merge Document") = vbNo Then
Exit Sub
End If
Dialogs(wdDialogFileOpen).Show
Dialogs(wdDialogMailMergeRecipients).Display
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
End Sub