Avatar of Eduardo Aviles
Eduardo Aviles
Flag for United States of America

asked on 

Counting Visio Pages with Vb Script

Hello Experts,
   I would like to create a VBScript that can look into a directory and count the number of pages per each Visio file.  I have done it for other MS files, but I am having no luck in producing it for Visio files. I have started playing with it with no success any help to achieve this task would be most appreciated.

Starting Code:

   Private Sub VisioQuery
      For each file in Folder.Files
            If fso.GetExtensionName(file.Name) = "vsd" or fso.GetExtensionName(file.Name) = "vsdx" Then
                  numpages = ActiveDocument.Pages.Count
                  For i = 1 to numpages
                        Set CurPage = ActiveDocument.Pages(i)
                              Msgbox CurPage.Name
            End if

End Sub
VB Script

Avatar of undefined
Last Comment

8/22/2022 - Mon