View Single Post
 
Old 01-17-2016, 10:24 AM
moneal62 moneal62 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jan 2016
Posts: 4
moneal62 is on a distinguished road
Default 5941 error message in macro used in merge

All, I have a mail merge and macro that has been running since 2003 that has all of a sudden stopped working with a 5941 error message. Word 2010. It debugs on the last line:



Windows("M_HERBARIUM_LABEL.DOTX").Activate



Here is the whole code, any help greatly appreciated, thank you.

Mike O.



***

Sub MERGE_DEFAULT()
'
' MERGE_DEFAULT Macro
' Macro recorded 9/25/2003 by Greg Harmison
'

With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = True
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
Application.Templates.LoadBuildingBlocks
Windows("M_HERBARIUM_LABEL.DOTX").Activate
End Sub
Reply With Quote