Howdy, all.
Hope this is an easy fix . . .
Just wondering how to change the value "SheetNaem$" into a variable in the line
I have 3 different worksheets that 10 different templates need to draw from, and compiling the data in any other way won't work since upstream folder designations play a part in deciding which template is accessed. So there.
Thanks in advance - this is still the coolest site ever.
Hope this is an easy fix . . .
Code:
AppWd.ActiveDocument.MailMerge.OpenDataSource Name:= _
"G:\DATA\Huge\Medium\Small\MyWorkbook.xlsm" _
, ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:= _
"Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=G:\DATA\Huge\Medium\Small\MyWorkbook.xlsm;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet" _
, SQLStatement:="SELECT * FROM 'SheetNaem$'", SQLStatement1:="", SubType:= _
wdMergeSubTypeAccess
Just wondering how to change the value "SheetNaem$" into a variable in the line
Code:
SQLStatement:="SELECT * FROM 'SheetNaem$'",
I have 3 different worksheets that 10 different templates need to draw from, and compiling the data in any other way won't work since upstream folder designations play a part in deciding which template is accessed. So there.
Thanks in advance - this is still the coolest site ever.