+ Reply to Thread
Results 1 to 4 of 4

MS Word Macro. Form Field Reference Question.

  1. #1
    Registered User
    Join Date
    07-25-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    11

    MS Word Macro. Form Field Reference Question.

    Hi all,

    hopefully it is ok if I ask a question that is about MS word macros really quick...

    I have a couple tables in my word doc, and have a drop down menu to fill in one of the cells in one of the tables. I want to create a macro that will fill in another cell in a different table based on what the user selected in the drop down menu. I think know how I would write the macro and know that I could assign it to be executed once the user has selected the option in the dropdown menu, but am not sure how in word I would be able to reference which cell to put the results in.

    Any help would be appreciated.

    Thanks!
    Last edited by gunerstahl; 09-07-2011 at 12:36 PM.

  2. #2
    Registered User
    Join Date
    07-25-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Quick Question About Word Macros

    Ok, this is the same problem, but I am a little further along, and have a more concrete question.

    I have a dropdown form (Dropdown1) and the destination formfield (Text1). Depending on what the user selects in the dropdown menu (construction, design, or planning) I want a certain text to appear in the destination formfield. Below is the code I have been experimenting with (I based it off some other code I was able to find online), but I continue to get the "Method or Data Method Not Found" for line 6.

    Any advice?

    Sub Test()
    Dim FF As FormFields
    Set FF = ActiveDocument.FormFields("Text1")
    Select Case ActiveDocument.FormFields("Dropdown1").Result
    Case "Construction"
    FF.Result = "Step 2"
    Case "Design"
    FF.Result = "Step 1"
    Case "Planning"
    FF.Result = "N/A"
    End Select
    End Sub

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Quick Question About Word Macros

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: MS Word Macro. Form Field Reference Question.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1