+ Reply to Thread
Results 1 to 2 of 2

Excel macro to Word document

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-16-2012
    Location
    Halifax, UK
    MS-Off Ver
    MS Office 365
    Posts
    206

    Excel macro to Word document

    Hi
    I have a costing sheet in excel that generates a quote within another sheet, however the people thatwill be using it don't what the quote done in excel, they want it in word. So I am looking for a macro that will do this.
    So far I have found one and it works as I need it to,but I need some alignment code as it copies everything to word and its all over the place. Any ideas?

    Const strRangeToCopy As String = ("print_area")
    
    
    Sub Macro8()
    
        Dim appWord As Object
    
        Range(strRangeToCopy).Copy
    
        On Error Resume Next
            Set appWord = GetObject(, "Word.Application")
        On Error GoTo 0
        If appWord Is Nothing Then Set appWord = CreateObject("Word.Application")
    
        With appWord
            .Documents.Add
            .Selection.Paste
            .Visible = True
        End With
    
    End Sub

  2. #2
    Forum Contributor
    Join Date
    03-16-2012
    Location
    Halifax, UK
    MS-Off Ver
    MS Office 365
    Posts
    206

    Re: Excel macro to Word document

    Has anyone got any ideas on the format issue? Or is there another way around this?
    Kieran

+ 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. Excel Macro to Poulate Word Document
    By Thomo88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2013, 07:46 AM
  2. Copy Macro from Excel To Word Document
    By twitch73 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2013, 03:08 AM
  3. Excel macro to assemble word documents
    By gabrieljb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2012, 05:53 AM
  4. Produce a Word Document from Excel Macro Help
    By GBWF32 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2012, 11:39 AM
  5. Open MS WORD document from Excel macro?
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2007, 12:46 PM

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