Results 1 to 5 of 5

Macro to copy worksheet into word

Threaded View

  1. #1
    Registered User
    Join Date
    11-12-2007
    Posts
    30

    Macro to copy worksheet into word

    Hi all,
    I need a macro that will copy a worksheet into a new word document. I don't want the data to be linked, I just want it to paste the values, like when you do Paste Special> Values. There is a specify range of data I want to copy- Cells B2:H80.

    I've created the following code from stuff I found on the internet and by adjusting it a bit. I'm not a programmer, so this is a shot in the dark.

    Sub OpenSpecificDoc()
    Dim wrdApp As Word.Application

    Set wrdApp = CreateObject("word.Application")

    wrdApp.Documents.Add



    wrdApp.Visible = True


    Range("b2:h88").Select
    Selection.Copy

    wrdApp.Selection.PasteSpecial Link:=False, DataType:=wdPasteMetafilePicture, _
    Placement:=wdInLine, DisplayAsIcon:=False


    End Sub
    The problem with this is that it doesn't paste the entire selection, can anyone explain why it doesn't and how I can remedy this?
    Thank you,
    Pete
    Last edited by cannon_lab; 05-21-2008 at 07:49 AM.

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