+ Reply to Thread
Results 1 to 7 of 7

VBA to export sheet to word and save

  1. #1
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    VBA to export sheet to word and save

    Hi Guys,

    I have found a few similar codes online but none of them seem to fit the bill.

    I need a VBA code that will Export the contents of 'Sheet 1' to a word document and save the word document as the value in cell A1 which holds the title.

    It sounds simple but i cant even begin to get this working.

    Any help is appreciated!

    Many thanks!

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: VBA to export sheet to word and save

    You could upload an example workbook.
    Is the sheet small enough to fit on one word page? or how will it look like?

  3. #3
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: VBA to export sheet to word and save

    Hi stojko89,

    The data will be variable but sometimes will extend onto more than one page.

    Example attached.

    Thanks for any help you can give!

    Regards
    Attached Files Attached Files

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: VBA to export sheet to word and save

    Ok here goes:
    Please Login or Register  to view this content.
    Just change the fLoc to the folder you want the file to be saved and the wrdDoc to the file you want opend when you copy stuff to word.
    Then run the macro Excel to word.
    It counts till the last used row in column A so everything will be copyed that is found.

    ---------- Post added at 02:02 PM ---------- Previous post was at 02:00 PM ----------

    When in Excel hit Alt+F11 and go to Tools/References and tick the word 12 library. so you'll be able to use this

  5. #5
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: VBA to export sheet to word and save

    Stojko! This is absolutely perfect!

    I have applied this to my spreadsheet and it works EXACTLY as i wanted it to.

    Thank you so much for your advice with this! It has really saved me a lot of time!

    Many thanks

    F

  6. #6
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: VBA to export sheet to word and save

    Happy to help

  7. #7
    Registered User
    Join Date
    07-30-2013
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: VBA to export sheet to word and save

    stojko89: I used your solution, and it is working great.

    Just wondering if you could help me to amend it i would need to do two simple things:

    1. copy B1 and set it bold & centered:

    Please Login or Register  to view this content.
    2. i need to center the rest of the text

    Would be great if you could help me to figure this out.

    Thanks in advance,

    DC

+ 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