My code is now
Function RunWordMacro()
Const wdFieldMergeField As Long = 59
Const wdSendToEmail As Long = 2
Const wdDefaultFirstRecord As Long = 1
Const wdDefaultLastRecord As Long = -16
Dim WordApp As Object
Dim WordDoc As Object
Set WordApp = CreateObject("Word.Application")...
I'm sorry, I still don't understand where to put it.
using the ? thing, I found:
?wdSendToEmail
2
?wdDefaultFirstRecord
1
?wdDefaultLastRecord
-16
Thank you for your patience.
Thanks for your help. It says my macros aren't enabled, even though I'm pretty sure they are. How else could I find them? and where in the code do I put that line? I'm very new to this (Just started yesterday). Thanks again for your prompt response.
My code is as follows:
Function RunWordMacro()
Dim WordApp As Object
Dim WordDoc As Object
Set WordApp = CreateObject("Word.Application")
Set WordDoc = WordApp.Documents.Open _
("S:\MGMTSRV\INDIVIDUAL STAFF PROJECTS\MSwagle1\mailmerge.docm")
WordApp.Visible = True...