General information
Category:
COM/DCOM and OLE Automation
I'm having trouble figuring out exactly how to tell Word to open the data for a mail merge. The data file is an Excel spreadsheet.
So far I have...
oWord.ActiveDocument.MailMerge.
...and have tried...
oWord.ActiveDocument.MailMerge.DataSource.Name = m.dir+"data\labels.xls"
oWord.ActiveDocument.MailMerge.OpenDataSource.name=m.dir+"data\labels.xls"
oWord.ActiveDocument.MailMerge.OpenDataSource.DataSource.Name=m.dir+"data\labels.xls"
oWord.ActiveDocument.MailMerge.OpenDataSource.ShowWizard.DataSource.Name=m.dir+"data\labels.xls"
oWord.ActiveDocument.MailMerge.DataSource=m.dir+"data\labels.xls"
oWord.ActiveDocument.MailMerge.OpenDataSource.DataSource.Name=m.dir+"data\labels.xls"
I've been receiving "'Name' not a by reference property" or "parameter not optional".
Sure hope I'm getting close!
Any suggestions are GREATLY appreciated.
Martha
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only