Thread: [Solved] Convert Ole objects
View Single Post
 
Old 05-05-2020, 09:50 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,527
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub ConvertTblObjs()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
  For i = .InlineShapes.Count To 1 Step -1
    With .InlineShapes(i)
      If Not .OLEFormat Is Nothing Then
        If Split(.OLEFormat.ClassType, ".")(0) = "Word" Then
          .OLEFormat.Object.Tables(1).Range.Copy
          .Range.Paste
        End If
      End If
    End With
  Next
End With
Application.ScreenUpdating = True
MsgBox "Finished processing!"
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote