LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Pasting a Range to Word

Hi all

I have a sub written (see below) to copy a range of data from Excel
and paste it into the active word document. All works fine with other
versions I have written but now I am copying a Landscape a4 page to
word (also landscape a4).

I want to copy a1 to ah15 as is set in page1. however when I paste
this it only copies to ag15. Have I declared or set something wrong in
this code.



Cheers

Ian

Sub Report_Description_Data()

Dim WDApp As Word.Application
Dim WDDoc As Word.Document

Dim ws As Worksheet
Set ws = Worksheets("description")
Set Rng = ws.Range("a12:ah" & ws.Range("a12").End(xlDown).Row)
Set page1 = ws.Range(Cells(1, 1), Cells(15, 44))



sample_no = Rng.Rows.Count
Total_pages = (sample_no - 29) \ 20 + 2
' Reference Word XP
Set WDApp = GetObject(, "Word.Application.10")
' Reference active document
Set WDDoc = WDApp.ActiveDocument


page1.CopyPicture Appearance:=xlPrinter, Format:=xlPicture

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

end sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting Spreadsheet into Word Marianne Excel Discussion (Misc queries) 7 July 7th 08 01:43 PM
Pasting Excel ('07) Range with Chart in Word ('07) Blaknecr8 Charts and Charting in Excel 0 January 11th 08 08:20 PM
Pasting into word Naz Excel Discussion (Misc queries) 0 June 6th 07 02:10 PM
Pasting from Word Table Eric Excel Discussion (Misc queries) 3 March 22nd 07 06:53 PM
Pasting from Word into Excel Mel Excel Discussion (Misc queries) 1 January 12th 07 06:58 PM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"