Hello!
So I have been working some in vba in Excel but now I need to make a more automated report in Word and cant really get a hang of updating shapes.
So for example on the front page I want a normal rectangular shape with text. the text needs to be linked to either a cell or the original shape in an Excel file. I have tried to copy paste the shape as an graphic object and run this macro but that dosent work. I found that I cant paste a shape as a link.
I would have thought this thing would have been easier sine it should be fairly common that someone needs to link stuff from excel etc
This code is what I currently have for updating text and graphs.
Sub UpdateText()' ThisDocument.InlineShapes(1).LinkFormat.Update ActiveDocument.Fields.Update On Error Resume Next Dim iShp As Word.InlineShape For Each iShp In ActiveDocument.InlineShapes iShp.LinkFormat.Update Next End Sub
Next problem:
I also have a chart that I run a macro on and format the colors on (a wind rose). The simple update macro dont work which I assumed it wouldnt since it is the formatting that changes and not the values. Any idea how I get the formatting to update?