cvincent
Board Regular
- Joined
- Aug 28, 2011
- Messages
- 66
I am attempting to utilize data from my Excel file to merge into a Word form. Users can use search buttons to filter selected data, which is then copied to a tab entitled "Selected Contacts". I can then run a macro that opens my Word 2007 merge document, but I am unable to create the code to run the actual merge with the "Selected Contacts" and then close the original merge document. Also, when it opens the Word merge document, it asks if it should be opened as read only, and I would like that done automatically without being asked. Any assistance would be appreciated. My code is:
Sub OpenWordDoc()
Dim wordApp As Object
Dim wordDoc As Object
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("G:\EMERGENCY CONTACT MERGE DOC (6-2013).docm")
End Sub
Sub OpenWordDoc()
Dim wordApp As Object
Dim wordDoc As Object
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("G:\EMERGENCY CONTACT MERGE DOC (6-2013).docm")
End Sub