 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
David Guest
|
Posted: Thu May 10, 2007 8:39 pm Post subject: Word Mail Merge using Excel spreadsheet |
|
|
I'm trying to do a mail merge using an excel spreadsheet, but using
the following OpenDatasource command, but Word asks which workbook
(Sheet1, Sheet2, Sheet3) to use. How can I tell it to automatically
use Sheet1?
wrdDoc.MailMerge.OpenDatasource(
MergeFile , // Name
{nil} , // Format
False , // ConfirmConversions,
True , // ReadOnly
{nil} , // LinkToSource
{nil} , // AddToRecentFiles
{nil} , // PasswordDocument
{nil} , // PasswordTemplate
{nil} , // Revert
{nil} , // WritePasswordDocument
{nil} , // WritePasswordTemplate
'Entire Spreadsheet' , // Connection
{nil} , // SQLStatement
{nil} );// SQLStatement1
Thanks,
David |
|
| Back to top |
|
 |
Oliver Townshend Guest
|
Posted: Fri May 11, 2007 8:13 am Post subject: Re: Word Mail Merge using Excel spreadsheet |
|
|
| Quote: | I'm trying to do a mail merge using an excel spreadsheet, but using
the following OpenDatasource command, but Word asks which workbook
(Sheet1, Sheet2, Sheet3) to use. How can I tell it to automatically
use Sheet1?
|
The easiest way to find out what word wants to do is to record a macro of
the task you want automated, and examine the code. I'm sure that will work
in this case.
Oliver Townshend |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|