Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It seems as though I saw something like this on Jon Peltier's site today.
Look at www.peltiertech.com "Cush" wrote: I am using Excel to automate the creation of a simple report in Word. Due to limited stack space I've had to copy my charts in Excel as pictures. When I then try to copy and paste these pictures into a Word document as part of the automation, the picture doesn't stay where I pasted it in the report. Does anyone have the code that can be used in Excel to paste a picture in Word and have it stay in the same place? The other picture formatting (ex. wordwrap) specifications seem to work properly. I'm just having problems with the picture moving with the text written after it's pasted. I'm working in Excel and Word version 11 (2003) on XP. The code I am using works for Word version 9, but doesn't work for Word version 11. Here it is: appWord.Selection.TypeParagraph AppActivate "Microsoft Excel" Sheets("Congress_Charts").Select ActiveSheet.Shapes("Report1 - Pic01").Select Selection.Copy appWord.Selection.ParagraphFormat.Alignment = 1 appWord.Selection.PasteSpecial Link:=False, DataType:=wdPasteMetafilePicture, _ Placement:=wdFloatOverText, DisplayAsIcon:=False appWord.Selection.MoveRight Count:=1 appWord.Selection.ParagraphFormat.SpaceAfter = 20 appWord.Selection.ParagraphFormat.SpaceBefore = 10 appWord.Selection.TypeParagraph appWord.Selection.ParagraphFormat.Alignment = 3 appWord.Selection.TypeText _ "We need to invest in high schools..." Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pasting Pictures | Charts and Charting in Excel | |||
How do you export pictures from my pictures file into a word docu | New Users to Excel | |||
How to put pictures into an excel document for merging in Word? | Excel Worksheet Functions | |||
pasting pictures into Excel | Excel Programming | |||
Pasting pictures from Excel to Word (2000) | Excel Programming |