Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm creating a word automation in vb6 to create mail marge for mailing labels.Here is a help link to do it using a text file as data source. Now I want to do it using a 2d array as data source. I don't know how to use the 2d array instead the text file as data source. Please help.

share|improve this question
Word can't use in-memory objects or structures directly as the data source for a standard (out-of-the-box) MailMerge. You either need to save your array in a format that Word can use, or "roll your own merge". The only exception I know of would be if you had an ODBC driver or OLE DB provider that could get data from your array: unlikely, and even then, Word always needs to reference some kind of external file or object (such as a DSN) when connecting via OpenDataSource. – bibadiak Dec 26 '12 at 9:05
@bibadiak :: Is there any other ways to connect instead OpenDataSource? – Krishanu Dey Dec 26 '12 at 15:34
1  
I would follow bibadiaks advice and save your 2D array data to a COMMA delimited TEXT file and simply use that as the datasource. – Zaf Khan Dec 28 '12 at 18:19
Yes. I also did so to get my work done. – Krishanu Dey Jan 3 at 19:04

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.