Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

How to update mailmergefields?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FL Consultant - 22 Jul 2005 08:49 GMT
I am creating a VBA that will update mailmerge documents.  One set of data to
many files.  One of the MVPs suggested a good start.  I am not finding a way
to use the MailMergeField to be able to update the field itself.  I have
looked through the methods but I am a bit rusty on Oject Oriented code.  I
would appreciate some additonal insight.

Thank you
Signature

FL Consultant

Jean-Guy Marcil - 22 Jul 2005 15:01 GMT
FL Consultant was telling us:
FL Consultant nous racontait que :

> I am creating a VBA that will update mailmerge documents.  One set of
> data to many files.  One of the MVPs suggested a good start.  I am
> not finding a way to use the MailMergeField to be able to update the
> field itself.  I have looked through the methods but I am a bit rusty
> on Oject Oriented code.  I would appreciate some additonal insight.

Mailmerge fields cannot be updated as such. You insert mailmerge fields in a
document, then you execute a merge. Once the merge is finished, the
resulting document does not contain fields anymore.

What is it you are trying to do exactly? Also, it would help us help you if
you posted the relevant code so that we can see what you have and give you
useful pointers.
As is, your post is very vague...

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

FL Consultant - 23 Jul 2005 11:15 GMT
Thank you for responding.  What I am attempting to do is to take one set of
data and update many documents.  The data consist of name, address, phone,
and other information.  The document are different contracts that all need
the same data.  There are in fact a total of 250 contracts.

One MVP suggested using Find & ReplaceAll (BatchReplaceAll()) from the MVP
website.  That was good suggested except it will only work with one piece of
data.
I do not have any code thou I am developing some test stuff as I experiment.

It seems to me that there must be a way to do what I want to do.  For
example, I am able to locate the MailMergeField.  Is there a way to change
the field, and than I could print the new document or save it as new
document.  By printing or saving the changed document, I would not change the
original document that contains the MailMergeFields and the document could be
used again for MailMerging.

Is there a method that will allow me to change the MailMergeField?  Or is
there another way to do what I am attempting to do?

I have since learned that the initial need for me to create this
funtionality is no longer needed but as a programmer I still feel challenaged
and would like to see if I can make this work.

I hope this response gives you the information you need and I thank you for
taking the time to respond and any suggestions you might have.
Thanks

Signature

FL Consultant

> FL Consultant was telling us:
> FL Consultant nous racontait que :
[quoted text clipped - 13 lines]
> useful pointers.
> As is, your post is very vague...
Jean-Guy Marcil - 23 Jul 2005 19:14 GMT
FL Consultant was telling us:
FL Consultant nous racontait que :

> Thank you for responding.  What I am attempting to do is to take one
> set of data and update many documents.  The data consist of name,
[quoted text clipped - 5 lines]
> the MVP website.  That was good suggested except it will only work
> with one piece of data.

You can do the "Replace" routine many times. The best is to create a
Function that does the Find/Replace and to call this function as often as
you need passing it string variables to specify the find text and the
replace text.

> I do not have any code thou I am developing some test stuff as I
> experiment.
[quoted text clipped - 8 lines]
> Is there a method that will allow me to change the MailMergeField?
> Or is there another way to do what I am attempting to do?

If all the documents are merge source documents, i.e. they contain mailmerge
fields prior to a merge, look at the Code property of the mailmerge field
object.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

FL Consultant - 24 Jul 2005 12:04 GMT
Thank you for your assistance.
Signature

FL Consultant

> FL Consultant was telling us:
> FL Consultant nous racontait que :
[quoted text clipped - 30 lines]
> fields prior to a merge, look at the Code property of the mailmerge field
> object.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.