Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MailMerge Object in MS Word 97/VBScript

63 views
Skip to first unread message

Rick Garlick

unread,
May 27, 1999, 3:00:00 AM5/27/99
to
I am writing in VBScript from a custom form in MS Outlook.

I am trying to access the MailMerge object to merge a document.
I've tried the following and it does not work...

Set objWord = GetObject("c:\full.doc", "Word.Document")
objWord.Application.Visible = True
objWord.MailMerge.OpenDataSource("c:\temp\condata.txt")

I've tried this method on a few machine and I get varying results... One
machine says it can't find the Installable ISAM driver for the TXT
conversion... Another machine gives and ODBC error and says it Data source
name not found and no default driver specified. On my preview ver. of
Office 2000, however, it DOES work, and the document merges properly. I
can't figure out why this doesn't work with Word 97.

My other method was to try and open it like this...

Set objWord = CreateObject("Word.Application")
objWord.Documents.Open "C:\full.doc"
objWord.Application.Visible = True
objWord.Document.MailMerge.OpenDataSource("c:\temp\condata.txt")

This doesn't even work at all... So basically I'm looking for the correct
way to use the .MailMerge object... Does anyone know of a way that works
with Word 97??

Sue Mosher [MVP]

unread,
May 28, 1999, 3:00:00 AM5/28/99
to
You might want to post this in one of the Word newsgroups, since that's
where the Word merge and VBA gurus hang out.

Can you do a mail merge through the GUI in Word with a text file? If not,
then the problem is in Word's configuration. You may need to rerun setup and
add drivers.
--
Sue Mosher
Author of "The Microsoft Outlook E-mail and Fax Guide"
Exchange and Outlook FAQs at http://www.slipstick.com/exchange/


Rick Garlick <rick.g...@rebis.com> wrote in message
news:edN0RBHq#GA....@cppssbbsa02.microsoft.com...

Rick Garlick

unread,
May 28, 1999, 3:00:00 AM5/28/99
to
Ok, I'll try posting there. Yeah, I tried installing reinstalling ALL MS
Office components and it didn't fix it... I had a similar problem with
Access converting to Excel spreadsheet. When you go into Office setup the
exporter filters were dimmed out (so you couldn't add OR remove them) it
turned out there was a .DLL file that was from an older program (Access 2.0
I think...) and when I found the right one and deleted it, it then allowed
me to install the exporters. This may be the case, but I'm not seeing them
as being dimmed out, its says they're all installed... It could still be a
.DLL problem...
Thanks for the help though... I'll try running it through the Mail Merge
GUI and see what that brings up...

Sue Mosher [MVP] <sue...@slipstick.com> wrote in message
news:#9FynaQq#GA...@cppssbbsa02.microsoft.com...

0 new messages