Access -> Word Mailmerge questions 
Author Message
 Access -> Word Mailmerge questions

I have a set of Word 97 mailmerge documents.  I have a, reasonably large
(30 Mb) Access 97 database.

I am trying to call the Word document as a mailmerge from a query in the
Access database.  It works... or so it seems... but:

1) Sometimes it opens another copy of my database.  This can be rather
long as it is a big database.  I want to force it to use the currently
active and open database.  What's "strange" is that sometimes it runs
without opening another copy and sometimes it doesn't... I wish I knew
why!

2) After the mailmerge is done and the user closes Word:  Word asks if
they want to save their changes in their newly created document.  This
is normal and desired.  Word then asks if they want to save the changes
to the mailmerge document which was used.  This is what I would like to
avoid.  I do not want them modifying the model document nor having the
message.  I tried setting the model document as read-only but it didn't
change anything.

My mailmerge function, based on MS KnowledgeBase article Q159328, looks
like this:

public function MergeWord()
        dim objWord as Word.Document

    Set objWord = GetObject("MYMODEL.DOC", "Word.Document")

    objWord.Application.Visible = True

    objWord.MailMerge.MainDocumentType = wdFormLetters
    objWord.MailMerge.OpenDataSource Name:=CurrentDb.Name, _
                                     ReadOnly:=True, LinkToSource:=True,
_
                                     Revert:=False, Connection:="QUERY
reqWord"

    objWord.MailMerge.SuppressBlankLines = True
    objWord.MailMerge.Destination = wdSendToNewDocument
    objWord.MailMerge.Execute
end function

Thank you in advance for your assistance.

/****************************************************

// Paris - FRANCE             Web: http://www.*-*-*.com/
/****************************************************



Fri, 06 Oct 2000 03:00:00 GMT  
 Access -> Word Mailmerge questions

Derek,
I have solve this problem by exporting a table or query to a temp text file
and then mail merge it to Word
you can easy change this procedure

HTH

--
Best regards,
___________
Alex Dybenko
Point Limited

Home Page: http://www.geocities.com/SiliconValley/Heights/5091/
Moscow MS Access User Group, chairman
http://www.arimsoft.ru/msaccess


Quote:
> I have a set of Word 97 mailmerge documents.  I have a, reasonably large
> (30 Mb) Access 97 database.

> I am trying to call the Word document as a mailmerge from a query in the
> Access database.  It works... or so it seems... but:

> 1) Sometimes it opens another copy of my database.  This can be rather
> long as it is a big database.  I want to force it to use the currently
> active and open database.  What's "strange" is that sometimes it runs
> without opening another copy and sometimes it doesn't... I wish I knew
> why!

> 2) After the mailmerge is done and the user closes Word:  Word asks if
> they want to save their changes in their newly created document.  This
> is normal and desired.  Word then asks if they want to save the changes
> to the mailmerge document which was used.  This is what I would like to
> avoid.  I do not want them modifying the model document nor having the
> message.  I tried setting the model document as read-only but it didn't
> change anything.

> My mailmerge function, based on MS KnowledgeBase article Q159328, looks
> like this:

> public function MergeWord()
>    dim objWord as Word.Document

>     Set objWord = GetObject("MYMODEL.DOC", "Word.Document")

>     objWord.Application.Visible = True

>     objWord.MailMerge.MainDocumentType = wdFormLetters
>     objWord.MailMerge.OpenDataSource Name:=CurrentDb.Name, _
>                                      ReadOnly:=True, LinkToSource:=True,
> _
>                                      Revert:=False, Connection:="QUERY
> reqWord"

>     objWord.MailMerge.SuppressBlankLines = True
>     objWord.MailMerge.Destination = wdSendToNewDocument
>     objWord.MailMerge.Execute
> end function

> Thank you in advance for your assistance.

> /****************************************************

> // Paris - FRANCE             Web: http://www.erb.com
> /****************************************************



Fri, 06 Oct 2000 03:00:00 GMT  
 Access -> Word Mailmerge questions

Quote:
> -----Original Message-----

> Posted At: Monday, April 20, 1998 11:14 PM
> Posted To: modulesdaovba
> Conversation:      Access -> Word Mailmerge questions
> Subject:   Re: Access -> Word Mailmerge questions

        << I have solve this problem by exporting a table or query to a
temp text file
Quote:
> and then mail merge it to Word
> you can easy change this procedure >>

        We're in a network environment here with a multi-user database.
There are 50 users attacking the base at the same time.  It is possible
that two would create a mailmerge at the same time.  They would "attack"
the text file at the same time with "unexpected" results.

        That said.  I do not understand why the procedure suggested by
MS themselves does not work correctly...

/****************************************************

// Paris - FRANCE             Web: http://www.erb.com
/****************************************************



Sun, 08 Oct 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. dao 3.5 question word>>access

2. >10000 lines Excel - MailMerge with word via VBA Macro

3. Excel -> Word MailMerge (Excel Macro)

4. VB5 OLE -> Ms-Word 97 MailMerge

5. ADO -> Mailmerge Question

6. Word Mailmerge question

7. Access Word Mailmerge Code

8. MailMerge from Access 97 to Word 97, value lost

9. Checking Word Mailmerge status from Access VBA

10. problem mailmerging a Word 95 document from Access 95

11. Two problems with mailmerge from Access 97 to Word 97

12. MailMerge to Word 7 from Access 7.0 runtime ?

 

 
Powered by phpBB® Forum Software