Closed Thread
Results 1 to 8 of 8

Push cell value from Excel to bookmarks in Word

  1. #1
    Registered User
    Join Date
    06-27-2014
    Location
    Sarpsborg, Norway
    MS-Off Ver
    Microsoft 365 Home on Win 10 Pro
    Posts
    11

    Push cell value from Excel to bookmarks in Word

    Hi.

    I've found two sets of code that does what I need Excel to do. My problem is to combine the sets of code to operate as one.

    The sub I'm trying to get a Excel VBA macro to run:

    - Open my Word template file wich contains predefined bookmarks
    - The Word template must be saved with a new filename equal the value of a cell in Excel combined with additional text, plus the extention .docx, because of multiple users
    - Cell values from Excel linked in the macro pushed as text into the newly created *.docx Word document
    - Leave the Word document open
    - MsgBox in Excel when the push to Word is finished
    - Another MsgBox if process fails.

    Here is the combined sets of code. When I run it, it fails:

    Please Login or Register  to view this content.
    Anyone?

    Thanks?

    TJ
    Last edited by Tor Jan Idland; 06-28-2014 at 11:34 AM. Reason: SOLVED by the brilliant Norie. Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Push cell value from Excel to bookmarks in Word

    Please use the code tags. Read through the forum rules by clicking on link at the top of the page.
    ________________________________________________________
    If your problem is solved, update the thread as SOLVED: Go to the top of the first post-Select Thread Tools-Select Mark thread as Solved OR - Go to the first post - Click edit- Click Advance- Just below the word "Title:" you will see a dropdown with the word No prefix.- Change to Solve- Click Save.

    Show your gratitude to the person who helped you solving your problem by clicking on star button at the bottom of such post.

  3. #3
    Registered User
    Join Date
    06-27-2014
    Location
    Sarpsborg, Norway
    MS-Off Ver
    Microsoft 365 Home on Win 10 Pro
    Posts
    11

    Re: Push cell value from Excel to bookmarks in Word

    Oh, sorry. I have edited my post. Thanks.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Push cell value from Excel to bookmarks in Word

    How/where does the code fail?

    PS Are you sure you want to open the template itself? Don't you want to create a new document based on the template?
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    06-27-2014
    Location
    Sarpsborg, Norway
    MS-Off Ver
    Microsoft 365 Home on Win 10 Pro
    Posts
    11

    Re: Push cell value from Excel to bookmarks in Word

    Thanks. Yes, correct. I want the macro to create a new document based on the template.

    I get the errormessage: "Compile error: Invalid or unqualified reference".

    PS: I have asked the administrator to delete this thread because I have reposted it in the Commercial Services, but if you have som good advices, I'll be greatful.

    Thanks again.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Push cell value from Excel to bookmarks in Word

    This will compile and run.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-27-2014
    Location
    Sarpsborg, Norway
    MS-Off Ver
    Microsoft 365 Home on Win 10 Pro
    Posts
    11

    Re: Push cell value from Excel to bookmarks in Word

    YOU ARE BRILLIANT! THANKS.

    Now it works just the way it should.

    This was great help!

    Thanks again.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Push cell value from Excel to bookmarks in Word

    Thread posted in Commercial services, hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel Chart to Word Doc Using Bookmarks
    By leemanx in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 11:54 AM
  2. Consolidating bookmarks in word into excel
    By kchm_2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2012, 11:08 AM
  3. 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
  4. Excel and Word Bookmarks
    By JFamilo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2005, 01:05 AM
  5. [SOLVED] VBA, Bookmarks, Word and Excel... help please!
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2005, 05: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