title: VBA Macro to Paste Chart from Excel, into Word, and Format with Text Wrapping
body: <p>In my excel document I have a chart that I want to copy and paste into a MS-Word document. I want to avoid linking data, embedding workbooks and resizing (Excel has the chart formatted to my desired size). So I came up with/found the following code that almost works:</p>
  
  <pre><code>Sub PasteChart()
  
  Dim wd As Object
  Dim ObjDoc As Object
  Dim FilePath As String
  Dim FileName As String
  FilePath = "C:\Users\name\Desktop"
  FileName = "Template.docx"
  
  
  'check if template document is open in Word, otherwise open it
  On Error Resume Next
  Set wd = GetObject(, "Word.Application")
  If wd Is Nothing Then
      Set wd = CreateObject("Word.Application")
      Set ObjDoc = wd.Documents.Open(FilePath &amp; "\" &amp; FileName)
  Else
      On Error GoTo notOpen
      Set ObjDoc = wd.Documents(FileName)
      GoTo OpenAlready
  notOpen:
      Set ObjDoc = wd.Documents.Open(FilePath &amp; "\" &amp; FileName)
  End If
  OpenAlready:
  On Error GoTo 0
  
  'find Bookmark in template doc
  wd.Visible = True
  ObjDoc.Bookmarks("LPPU").Select
  
   'copy chart from Excel
   Sheets("Group Level Graphs").ChartObjects("Chart 1").Chart.ChartArea.Copy
  
   'insert chart to Bookmark in template doc
   wd.Selection.PasteSpecial Link:=False, DataType:=14, Placement:=0, _
      DisplayAsIcon:=False
  
   End Sub
  </code></pre>
  
  <p>The only issue is that the image is pasted as "In Line with Text" but I need it to be "Square with text wrapping". I can't get Word or Excel to record changing the image to "Square with text wrapping".</p>
  
  <p>The <code>PasteSpecial</code> part only does <code>wdFloatOverText</code> or <code>wdInLine</code> for placement and neither of them solve this issue. </p>
  
  <p>I am very new to VBA and have run out of ideas. I am still trying to find a way to format it, maybe using some kind of <code>WITH</code> statement. However I thought I would attempt to reach out for help while I continue google-foo and learning VBA from Youtube. </p>
  
  <p>Using <code>PasteAndFormat Type:=wdChartPicture</code> links the chart to excel. So that didn't work.</p>