Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

paste special picture (Excel graph) in Word

Status
Not open for further replies.

RobBroekhuis

Technical User
Oct 15, 2001
1,971
US
Hoping you can help me understand this curious behavior:
I'm writing a simple macro in Word to paste_special the Excel graph on the clipboard into the current document, apply a frame, and do some formatting. I had this all done for the situation where the Excel graph is copied from a Chart Sheet. Turns out it doesn't work when the Excel graph is copied from an embedded chart on a worksheet - for some reason, the paste-as selections are different for the two cases: for the chart sheet, I can paste as
DataType:=wdPasteMetafilePicture
whereas for the embedded chart I can only use
DataType:=wdPasteEnhancedMetafile
(any idea why this is?)
Anyway, I wrote some error handling code that tries both formats, which works allright - except that the second format, for some reason, does not allow me to paste with
Placement:=wdInLine
I get no error message, but the chart is pasted as a floating object, so that it becomes difficult to manipulate the object from that point onward. I'm puzzled as to why Word would not allow me to paste as an inline object. According to Word's help, wdInLine should be the default, but I've never found this to be the case (I'm using Word2000): if I don't specify it, I always get a floating object. Is there an option setting somewhere to change this?
I'm frustrated by all the little things that trip me up!
I'd appreciate any help or words of wisdom.
Rob

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top