Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Marco for pasting in word
Hi,
I want to use a macro to copy many selected range from excel to word. The ranges have different sizes and I paste as bitmap for a easy correc pasting. Questions: how to set the page orientation "landscape"? how to insert page break in .doc document? how to insert many ranges? (with the attached code, only rnValue2 is visible) I start with this code: ------------------------------------------------------------------------ Sub copia() Dim wApp As Object Dim wDoc As Object Dim rnValue As Range Set rnValue1 = Range("utile!A2:K59") Set rnValue2 = Range("utile!A60:K94") Set wApp = CreateObject("Word.Application") With wApp.Documents.Add() rnValue1.Copy ..Content.PasteSpecial Link:=False, DataType:=wdPasteBitmap, Placement:= _ wdFloatOverText, DisplayAsIcon:=False rnValue2.Copy ..Content.PasteSpecial Link:=False, DataType:=wdPasteBitmap, Placement:= _ wdFloatOverText, DisplayAsIcon:=False Application.CutCopyMode = False ..SaveAs Filename:=ThisWorkbook.Path & "\riassunto.doc" ..Close End With wApp.Quit End Sub ------------------------------------------------------------------------ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasting into word | Excel Discussion (Misc queries) | |||
Pasting from Word Table | Excel Discussion (Misc queries) | |||
Pasting from Word into Excel | Excel Discussion (Misc queries) | |||
Pasting into Word w/o lines??? | Charts and Charting in Excel | |||
pasting into Word... | Excel Programming |