Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Mar 2009
    Location
    INDIA
    Posts
    35
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    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

  3. #3
    Lounger
    Join Date
    Mar 2009
    Location
    INDIA
    Posts
    35
    Thanks
    2
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='783477' date='08-Jul-2009 05:11']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
    [/quote]

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •