Consulting

Results 1 to 3 of 3

Thread: Working with Mailmerge Fillin boxes

  1. #1
    VBAX Regular
    Joined
    Mar 2011
    Posts
    88
    Location

    Working with Mailmerge Fillin boxes

    I'm using Word 2013 and 2016 in separate Windows 10 machines.

    I'm adding a Fillin field using this code:
                     ActiveDocument.MailMerge.Fields.AddFillIn Range:=Selection.Range, _
                              Prompt:="Title for the Appendix?", DefaultFillInText:="Type Appendix title here.", AskOnce:=True
    On running the procedure it gives me this result:
    Capture.PNG

    Can someone tell me, please, if there is a way to:

    • Remove the Cancel button
    • Prevent the user from pressing Enter and creating a blank line after they've typed the details within the box?


    Why? I'm just trying to modify how people might use the form and prevent things going haywire.

    Thanks for any help.

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    3,607
    Location
    Why are you adding the FILLIN field via code instead of having it in the mailmerge main document to start with? Moreover, you cannot modify the FILLIN field's prompt to work the way you want. If there is something you need to do programmatically, consider using an Input Box instead and testing the validity of the input/response.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  3. #3
    VBAX Regular
    Joined
    Mar 2011
    Posts
    88
    Location
    Thanks, Paul, for your comments. Now I know one cannot change the FILLIN field's prompts.

    Good point about your suggestion about using an Input Box.

    Thanks.

    Roderick

Tags for this Thread

Posting Permissions

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