• Word: Locating Embedded objects/files residing in the document

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Word: Locating Embedded objects/files residing in the document

    Author
    Topic
    #461045

    Hello,

    Wanted to know, if their is any option in word, using which I can find out if their are any embedded objects residing in the document.

    Thanks.

    Viewing 0 reply threads
    Author
    Replies
    • #1168025

      You could run this macro:

      Code:
      Sub Test()
        Dim varObj As Variant
        Dim n As Integer
        For Each varObj In ActiveDocument.InlineShapes
      	If varObj.Type = wdInlineShapeEmbeddedOLEObject Then
      	  n = n + 1
      	End If
        Next varObj
        For Each varObj In ActiveDocument.Shapes
      	If varObj.Type = msoEmbeddedOLEObject Then
      	  n = n + 1
      	End If
        Next varObj
        MsgBox "This document contains " & n & " embedded object(s)", vbInformation
      End Sub
      • #1171570

        You could run this macro:

        Code:
        Sub Test()
          Dim varObj As Variant
          Dim n As Integer
          For Each varObj In ActiveDocument.InlineShapes
        	If varObj.Type = wdInlineShapeEmbeddedOLEObject Then
        	  n = n + 1
        	End If
          Next varObj
          For Each varObj In ActiveDocument.Shapes
        	If varObj.Type = msoEmbeddedOLEObject Then
        	  n = n + 1
        	End If
          Next varObj
          MsgBox "This document contains " & n & " embedded object(s)", vbInformation
        End Sub

        Thanks, Hans !! this is really helping…Please accept a BIG thanks from my complete team

    Viewing 0 reply threads
    Reply To: Word: Locating Embedded objects/files residing in the document

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: