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 / Mailmerge and Fax / February 2005

Tip: Looking for answers? Try searching our database.

Mail Merge Into Word Text Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
blabore - 13 Feb 2005 20:17 GMT
I have a Visual Basic .Net applicaiton that is used to setup mail merge
fields in a word document. Basically, the app creates menus in Word that
allow a user to insert mail merge fields, then when the user saves the
document, it records what mail merge fields where used, so a corresponding
data document can be created for the letter. My problem is that somehow the
mail merge fields that appear within a text box are missing when I iterate
through the mail merge fields collection (i.e. MyDocument.MailMerge.Fields).
You can reproduce the problem by creating a blank mail merge letter,
inserting a text box into the document, then put one or more mail merge
fields inside of the text box. The MailMerge.Fields.Count will remain 0. This
is a problem because when I later try to actually merge the document, Word
informs me that these fields are not in my data document. Is this a bug in
Word, or is there another set of Mail Merge fields I need to look for? Any
help would be appreciated.
Graham Mayor - 13 Feb 2005 21:08 GMT
Text boxes are not in the text layer of the document and do not work
correctly with merge fields within them. Use a frame or a table.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I have a Visual Basic .Net applicaiton that is used to setup mail
> merge fields in a word document. Basically, the app creates menus in
[quoted text clipped - 11 lines]
> bug in Word, or is there another set of Mail Merge fields I need to
> look for? Any help would be appreciated.
blabore - 13 Feb 2005 22:07 GMT
Graham,

Thanks for the help. Do you know of any way to at least detect if a text box
contains one or more merge fields? They way my app is setup, users pretty
much have full control over where they insert the merge fields. If possible,
I'd like a way to controls this behavoir, to avoid possible errors when the
merge is exectuted. Thanks again.

> Text boxes are not in the text layer of the document and do not work
> correctly with merge fields within them. Use a frame or a table.
[quoted text clipped - 14 lines]
> > bug in Word, or is there another set of Mail Merge fields I need to
> > look for? Any help would be appreciated.
Graham Mayor - 13 Feb 2005 23:00 GMT
Frankly no - though a macro to convert text boxes to frames might work

Sub BoxToFrame()
Dim oShp As Shape
   For Each oShp In ActiveDocument.Shapes
       oShp.ConvertToFrame
   Next oShp
End Sub

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Graham,
>
[quoted text clipped - 32 lines]
>>> bug in Word, or is there another set of Mail Merge fields I need to
>>> look for? Any help would be appreciated.
blabore - 14 Feb 2005 02:51 GMT
Graham,

Thanks again.

> Frankly no - though a macro to convert text boxes to frames might work
>
[quoted text clipped - 41 lines]
> >>> bug in Word, or is there another set of Mail Merge fields I need to
> >>> look for? Any help would be appreciated.
 
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.