macro - Is there such a thing as a macro that inspects a document and notifies the user that a dynamic dimension is on a page?

I found this topic, but what I need is more specific. 

community.coreldraw.com/.../290975

I just want a pop up box warning the user when the doc is saved that there are dynamic dimensions on certain pages and how many.

Parents
  • You could try this:

    Sub Count_Dynamic_Dims_Doc()
    
    Dim pageThis As Page
    Dim lngDynamicCountThisPage As Long
    Dim lngDynamicCountTotal As Long
    
        If Not ActiveDocument Is Nothing Then
            For Each pageThis In ActiveDocument.Pages
                lngDynamicCountThisPage = pageThis.Shapes.FindShapes(, cdrLinearDimensionShape, , "@com.dimension.dynamictext='True'").Count
                Select Case lngDynamicCountThisPage
                    Case 0
                        'Do nothing
                    Case 1
                        MsgBox "Page " & pageThis.Index & " has " & "1 dynamic dimension."
                    Case Else
                        MsgBox "Page " & pageThis.Index & " has " & lngDynamicCountThisPage & " dynamic dimensions."
                End Select
                lngDynamicCountTotal = lngDynamicCountTotal + lngDynamicCountThisPage
            Next pageThis
            Select Case lngDynamicCountTotal
                Case 0
                    MsgBox "Done." & vbCrLf & vbCrLf & "No dynamic dimension were found in the document."
                Case 1
                    MsgBox "Done." & vbCrLf & "1 dynamic dimension was found in the document."
                Case Else
                    MsgBox "Done." & vbCrLf & vbCrLf & lngDynamicCountTotal & " dynamic dimensions were found in the document."
            End Select
        Else
            MsgBox "No document is active."
        End If
    End Sub
    
Reply Children