Using .copychart
in pasting from Excel to Word errors in my code below. If both applications are visible, as I've had them while programming, then it works well.
Is there a way to hide the applications (let them run in the background) and still use .copychart
or do I need a different solution?
I am only showing a small parts of the code, as the entire module is quite large. Here is where I get the error on the .copypicture
line:
'Copy charts to Worddocument
Dim cht1 As Chart, cht2 As Chart, cht3 As Chart
With tbl2
cht1.CopyPicture Appearance:=xlScreen, Format:=xlPicture
With .cell(4, 1).Tables(1).cell(2, 1).Range
.Paste 'Paste NetRevenue Graph
.InlineShapes(1).ScaleWidth = 100
End With
End With
There are a few options you can try:
For Word:
If you have
1.
2.
.
For Excel:
1.
2.
3.