View Single Post
 
Old 02-01-2012, 11:08 AM
Gage262 Gage262 is offline Windows XP Office 2010 32bit
Novice
 
Join Date: Oct 2011
Posts: 5
Gage262 is on a distinguished road
Default

I ended up getting this to work(for the most part) by calling code on the document open event.

Code:
Public Sub Document_Open()

With ActiveDocument.MailMerge
    .MainDocumentType = wdFormLetters
    .OpenHeaderSource Name:="c:\mailmergetest\myheader.docx", Revert:=False, AddToRecentFiles:=False, ConfirmConversions:=False, ReadOnly:=True
    .OpenDataSource Name:="C:\mailmergetest\mydatasource.txt", ConfirmConversions:=False
End With
ActiveDocument.ActiveWindow.View.MailMergeDataView = True

End Sub
The thing is for this to work you have to click the mail merge reset button and then save it otherwise you get the message that it is already a mail merge document.

I believe it has to be saved as a .docm as well.

In the end we stayed with the .doc format.

Hope this helps you.
Reply With Quote