Q: Opening Mail Merge doc from Access

M

Mark

All,
Using Access, Word 2003.

I tried using the word object in Access to open up a word mail merge:
'Code start
Dim objApp As Object
dim strDocName as string 'populate with filename
Set objApp = CreateObject("Word.Application")
objApp.Visible = True
objApp.Documents.Open strDocName
'code end

The doc opens, but the mail merge doesn't work -- it's grayed out. It
doesn't allow me to merge the document; I have to go through the wizard to
pick the data source to do the mail merge.

Now, if I use the shell() command, it works fine (though I guess now Word
2003 warns the user it's running a mail merge). It also works fine if I open
the word doc itself (ie, not through Access)

I always though the shell() command was a kludge for this sort of thing --
you should use a word object.

So,
1) is that correct? Should I use the word object instead of shell and if so,
why?
2) Why is it when I use the word object, I lose that merge information. It
seems to "keep" the old data from the previous mail merge, even if I close
and reopen the database and the word doc.

Thanks!
-Mark
 
Top