Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
olegnaumov olegnaumov is offline
Junior Member
 
Posts: 0
Default

Quote:
Originally Posted by olegnaumov View Post
It works well, but for some reason it fails to delete Autoshapes placed inside Drawing Canvas. Could you help with that?
Update:

Never mind! Here's the code:
Code:
Dim oShp As Shape
Dim oFrm As InlineShape

Dim nCount As Long


For nCount = ActiveDocument.Shapes.Count To 1 Step -1
    Set oShp = ActiveDocument.Shapes(nCount)
   
    If oShp.Type = msoAutoShape Then
        oShp.Delete
    Else
        If oShp.Type = msoCanvas Then
            For i = oShp.CanvasItems.Count To 1 Step -1
                If oShp.CanvasItems(i).Type = msoAutoShape Then
                    oShp.CanvasItems(i).Delete
                End If
            Next i
        End If
    End If
    
    MsgBox ("Job's done!")
Next nCount


 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autoshapes and text marf Microsoft Word Help 1 June 6th 08 02:51 PM
autoshapes and layouts. woodyuk Microsoft Word Help 2 February 28th 08 06:46 PM
watermarks and Autoshapes woodyuk Microsoft Word Help 1 February 28th 08 02:46 PM
How do I move autoshapes J Penney Microsoft Word Help 3 December 1st 06 02:14 PM
Autoshapes in Table question Mike Hyndman New Users 2 January 28th 05 06:13 PM


All times are GMT +1. The time now is 07:18 PM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"