Results 1 to 16 of 16

Thread: Solved: Dropdown FormField Inserting Files

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Apr 2005
    Posts
    86
    Location

    Solved: Dropdown FormField Inserting Files

    Hi, hope you can help! Im a bit new to this

    I have created a form on word using Dropdown and Text Formfields. I have the following macro running on exit in a Dropdown Formfield (Dropdown1). How can i get it to insert the text from the file in a Text Formfield (Text1) instead of at the end of the document??


    [vba]Sub DropSelection()
    Dim myrange As Range
    ActiveDocument.Unprotect
    Set myrange = ActiveDocument.Range
    myrange.Collapse wdCollapseEnd
    myrange.InsertFile "C:\Documents and Settings\pwilliams\My Documents\" & _
    ActiveDocument.FormFields("DropDown1").DropDown.Value & ".doc"
    ActiveDocument.Protect wdAllowOnlyFormFields, NoReset
    End Sub[/vba]


    Many Thanks
    Pete
    Last edited by BlueCactus; 04-28-2005 at 06:18 AM. Reason: Added VBA tags

Posting Permissions

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