Hello there,
I'm new to this forum and hope I can find some support here, but to what I've read so far I'm very optimistic
I developed some macros in Excel to copy some charts from an Excel workbook to a self-created Word template. The Word template has some bookmarks at whose positions I want the charts to be copied. It is important that the charts in Word stay linked to the original ones in Excel. In office 2007 on my Windows machine this works fine.
However this code doesn't work on my Mac with Office 2011. I get a runtime error 5345 "Application-defined or operation-defined error." and have no idea what is the root of this error. The error occurs in the last row of ChartToWord where the chart shall finally be pasted into the word document. I also tried to record the manual copy and paste procedure on the mac, but I got the same results as in Office 2007. I guess it is caused by the connection of WoObj and PasteSpecial but I have no idea how to solve it.
I use the following macro:
------------------------------------------------------------
EDIT: OK I found out, that it is caused by the "Link:=True" attribute. If it is set to "False", then it'll work. I really don't know why, because when I do it manually I have no problems with the links. Another problem is then, that the charts will be resized while pasting (mostly smaller), so they doesn't fit into their predefined space in the template anymore. Any suggestions for that?
Can anybody please kindly give me an advice? Thank you very much!
Best regards,
Daniel
Bookmarks