Consulting

Results 1 to 4 of 4

Thread: MailMerge and TextBox Element

  1. #1
    VBAX Newbie
    Joined
    Feb 2005
    Posts
    2
    Location

    MailMerge and TextBox Element

    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

  2. #2
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    I hate to ask, but often find people doing it unnecessarily: Why are you building your merge doc in VBA?
    ~Anne Troy

  3. #3
    VBAX Newbie
    Joined
    Feb 2005
    Posts
    2
    Location
    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

  4. #4
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    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.
    ~Anne Troy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •