+ Reply to Thread
Results 1 to 10 of 10

How to Generate a Word document, using VBA, and using part of the data on excel?

  1. #1
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    How to Generate a Word document, using VBA, and using part of the data on excel?

    Hi everyone,

    I have 2 documents;

    First one is an excel document, kind of a form to collect data, to later on generate a quotation for the client.
    Second Document is a Word document, like final quote to sent to the client.

    How can I create a code, linked to a button, that will bring up the Word document and filling up the info, like client name, multiple lines of jobs quoting with hours, price....

    All I could find so far seems to be related to mailmerge, and that's not really what I am looking for

    Thanks for helping on this one

  2. #2
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    do you have a template setup or do you need to use a new blank word document? (template as in a pre-format word document)

  3. #3
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    I have a template already set up, I want Excel to open it from a specific location and save it with a new name based on a combination of 2 cells value.

    I am not sure if this can be done
    Last edited by sylvainsyl20; 04-11-2016 at 05:47 PM.

  4. #4
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    yes it can be done, did you set up the template with either bookmarks or some sort of marker that we can use to correctly place the data?

  5. #5
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    Yes, I placed a few bookmarks to start with, when I get this working, I will be able to add some more

  6. #6
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    well if i give you something to start with, do you think you can follow along and give it a go? its quite simple to do, but it probably will require a little tinkering about with the template...

  7. #7
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    Anything that help me getting this one rolling will be much appreciated

  8. #8
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    you could place this on a button sub or call it from a button sub, either way

    I'm not going to loop anything here, I'm assuming there are a manageable amount of bookmarks that we will use so we will just access them all one at a time to keep things easy.

    Please Login or Register  to view this content.
    ok this is the basic code to get you started.......aall you need to do it tie up the data in excel to the bookmarks in word.

    just post back if it has problems i didnt test this. but it should be fine

  9. #9
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    Oh, also note that the bookmarks on the saved document will be removed, this is normal for the method i used to add the text to the document, if you want to keep the bookmarks on the saved file we need to edit the code a little

  10. #10
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    Re: How to Generate a Word document, using VBA, and using part of the data on excel?

    Maraming Salamat!

    Sorry for the delay, I was out of the office. I also have a problem with MS Office, cannot Reference a Word Doc in Excel and vice versa, I will probably have to reinstall, since repair didn't do the trick (as most of the time).

    I am hoping to be able to get back on this one today

+ 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. Mail merge of Excel data to Excel document, not using a Word document
    By Howie D in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2015, 07:35 AM
  2. Excel tool to maintain database and generate word document through excel
    By ppganesh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2015, 03:58 AM
  3. Replies: 1
    Last Post: 03-03-2014, 05:36 PM
  4. Excel 2007 : Generate word document from excel file
    By stevetothink in forum Excel General
    Replies: 5
    Last Post: 09-09-2011, 05:42 PM
  5. Looping through an Excel list to generate a dynamic Word document
    By Nabla21 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-30-2011, 09:25 AM
  6. Hyperlink to a specific part of a Word document
    By anar_baku in forum Excel General
    Replies: 3
    Last Post: 01-15-2009, 06:10 AM
  7. Replies: 1
    Last Post: 06-01-2006, 09:55 AM

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