J
Jenny B.
Hi All,
I setup a Macro that opens a text file into Excel and then immediately
formats the data and lastly merges the data to an already formatted Word
Merge doc.
My question is, what can I add to the below code to make the routine
automatically select the merge table vs. the Macro pausing and having the
user select? The table (tab) from Excel this is merging from is named
“MergeHomeâ€.
Thank you in advance for any thoughts – Jenny B.
Sub Word()
Application.ScreenUpdating = False
Call JLBtheGreat
strLetterPath = "C:\Documents and Settings\jenny\Desktop\Transmittal.doc"
Set appWD = CreateObject("Word.Application")
appWD.Visible = True
Set wdDoc = appWD.Documents.Open(Filename:=strLetterPath)
wdDoc.MailMerge.OpenDataSource Name:="C:\Documents and
Settings\jenny\Desktop\Splash Screen.xls", _
ConfirmConversions:=False, _
Connection:="", SQLStatement:="", SQLStatement1:=""
Application.ScreenUpdating = True
appWD.Run "MergeLines"
End Sub
I setup a Macro that opens a text file into Excel and then immediately
formats the data and lastly merges the data to an already formatted Word
Merge doc.
My question is, what can I add to the below code to make the routine
automatically select the merge table vs. the Macro pausing and having the
user select? The table (tab) from Excel this is merging from is named
“MergeHomeâ€.
Thank you in advance for any thoughts – Jenny B.
Sub Word()
Application.ScreenUpdating = False
Call JLBtheGreat
strLetterPath = "C:\Documents and Settings\jenny\Desktop\Transmittal.doc"
Set appWD = CreateObject("Word.Application")
appWD.Visible = True
Set wdDoc = appWD.Documents.Open(Filename:=strLetterPath)
wdDoc.MailMerge.OpenDataSource Name:="C:\Documents and
Settings\jenny\Desktop\Splash Screen.xls", _
ConfirmConversions:=False, _
Connection:="", SQLStatement:="", SQLStatement1:=""
Application.ScreenUpdating = True
appWD.Run "MergeLines"
End Sub