PDA

View Full Version : MailMerge and TextBox Element



medua
02-16-2005, 07:15 AM
Hi,
I have to create a mail merge on a document that uses Control Elements like Textboxes and Checkboxes a.s.o. and I need to fill these with MailMerge Fields. I have now found the following function:

ActiveDocument.MailMerge.Fields.Add Range:=Arange, _
Name:="CITYNAME"

this would add a MailMerge Field to a certain Range on the Doc, but I cannot figure out how to get a Range for a Textbox Element (or rather its value) or if that it even possible ?
can somebody maybe help ??
thanks

medua

Anne Troy
02-16-2005, 08:14 AM
I hate to ask, but often find people doing it unnecessarily: Why are you building your merge doc in VBA?

medua
02-16-2005, 08:20 AM
I just wanted to enter a mailmerge field into a textbox control element. I cannot do it via the word interface because it doesn' t let me... but maybe that means it is not possible.... but that's why I was/am fumbling around with vba

Anne Troy
02-16-2005, 08:26 AM
Ohhhh. CONTROL, okay. Nope. I don't think you're gonna get VBA to do it, either. You CAN use a textbox from the drawing toolbar, tho.