+ Reply to Thread
Results 1 to 7 of 7

add additional data to word document's bookmark in excel

  1. #1
    Registered User
    Join Date
    12-19-2009
    Location
    Goldsboro, N
    MS-Off Ver
    Excel 2003
    Posts
    21

    add additional data to word document's bookmark in excel

    I have an excel workbook that has seven worksheets tabs and on the last tab it has a a merge data button that enters the total for all the worksheet onto a word template. I works just fine. I need to add the report number to the word template that corresponds to the appropriate incident that is checked. I've attached the workbook and a word document of what the template should look like when merged.

    any help would be greatly appreciated.

    also posted here:http://www.vbaexpress.com/forum/showthread.php?t=39548
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: add additional data to word document's bookmark in excel

    Since you have chosen to accept the solutions at the site you provided a link to, this post will be closed.

    EDIT: Contacted by Ken Hobson at VBAX who said he does not have time to help further on the project. This post still requires a solution.
    Last edited by Leith Ross; 11-03-2011 at 11:34 AM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-19-2009
    Location
    Goldsboro, N
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: add additional data to word document's bookmark in excel

    This is the code K. Hobson so graciously provided that I could not figure out. Any help would be appreciated. Thanks

    Please Login or Register  to view this content.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: add additional data to word document's bookmark in excel

    1. Bookmarks have been designed for Word's Userinterface
    2. when using VBA you'd better apply documentvariables.
    3. the amount of coding is dependet of the amount of structuring the data in the workbook.
    4. Put the formulae, which results have to be put into the documentvariables of the Word document, into column K of a sheet (e.g. the sheet Disciplinary Report).
    5. the 'transfercode' can be:

    Please Login or Register  to view this content.
    Cfr. the attachments
    Attached Files Attached Files
    Last edited by snb; 11-03-2011 at 05:22 PM.



  5. #5
    Registered User
    Join Date
    12-19-2009
    Location
    Goldsboro, N
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: add additional data to word document's bookmark in excel

    I still don't understand! I downloaded the attachments and when I click the merge records nothing happens, Am I missing something here?

    Mr. Hobson came up with this code that does what I want, but it only works for the worksheet that the merge data button is on and all other data is lost. I have six worksheets that data has to be pulled from. I need this code modified to loop through all worksheets and enter all data to the word template and also the merge data button to be on the last sheet. I've attached the files also.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by RonNCmale; 11-04-2011 at 05:51 PM.

  6. #6
    Registered User
    Join Date
    12-19-2009
    Location
    Goldsboro, N
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: add additional data to word document's bookmark in excel

    Anyone have any other ideas as in a formula that could for each x return a report number(s) to a cell. I could then add to template as a bookmark.

  7. #7
    Registered User
    Join Date
    12-19-2009
    Location
    Goldsboro, N
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: add additional data to word document's bookmark in excel

    From the following thread:
    http://www.excelforum.com/excel-prog...ave-blank.html
    Is there a way to modify this formula:
    =IF(ISERROR(MATCH($A7,J$2:J$4,0)),"","X")
    to place results into the same cell. example:
    FordWords ChevyWords DodgeWords
    Item,Betty,Bobby Manly,From,Home Ram,Hard,Tree
    Last edited by RonNCmale; 11-06-2011 at 04:17 PM.

+ 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