+ Reply to Thread
Results 1 to 3 of 3

Input data into excel to open word document with corresponding data in specified bookmarks

  1. #1
    Registered User
    Join Date
    10-27-2017
    Location
    NYC
    MS-Off Ver
    2007 and 2016
    Posts
    2

    Input data into excel to open word document with corresponding data in specified bookmarks

    Hi all, I could definitely use your help in addressing my code. This is the first time I've ever coded in VBA so appreciate any beginner's advice and tips. As a brief background, I have an excel sheet of my county's zip codes (col 2) and their corresponding towns (col 3). I want to have a person enter their zip code into "A2". Excel searches thru the zip code column and finds the corresponding town. Afterwards, I would like it to open up a word document template, which has two bookmarks: "zip" and "town", and pull the corresponding zip code and town to the appropriate bookmark.

    Unfortunately, I keep getting an error of "Sub or Function not defined". Additionally, it highlights "Sub Worksheet_Change (ByVal Target As Range) and "cell" once I receive the error. Not sure what that means.


    Please Login or Register  to view this content.
    Last edited by codenoob; 10-27-2017 at 12:27 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Input data into excel to open word document with corresponding data in specified bookm

    As you are new, I will do this for you just this once, but ...

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Do this for yourself in future, please. Thanks.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-27-2017
    Location
    NYC
    MS-Off Ver
    2007 and 2016
    Posts
    2

    Re: Input data into excel to open word document with corresponding data in specified bookm

    My apologies and thanks for letting me know.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 09-11-2016, 07:40 PM
  2. VBA Transfer Data From Excel to Word and Keep Bookmarks in Word Documents
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2015, 05:37 AM
  3. Replies: 0
    Last Post: 11-06-2013, 09:00 AM
  4. Populating data from excel into word bookmarks
    By pspiv0359 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2013, 06:25 AM
  5. Excel to Word passing data dynamically with bookmarks from Excel to Word
    By csekhar.apps in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2010, 09:52 AM
  6. exporting data to appear at Bookmarks in a Word Document
    By Dave Kilroy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2005, 02:44 PM
  7. exporting Excel data to Word using Bookmarks
    By Dave Kilroy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-19-2005, 01:06 PM

Tags for this Thread

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