Solved

VBA on Visio 2013 - how to delete a range of pages

Posted on 2013-12-22
1
1,428 Views
Last Modified: 2013-12-23
I would like to delete the first five pages in my visio file using VBA.
What is the code to do this?
0
Comment
Question by:brothertruffle880
1 Comment
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 39735267
This will work by deleting "page 1" five times (each time you delete the page that is currently number 1, the next page becomes number 1).
Sub DeleteFirstFivePages()
    For i = 1 To 5
        ActiveDocument.Pages(1).Delete (False)
    Next
End Sub

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AWS has developed and created its highly available global infrastructure allowing users to deploy and manage their estates all across the world through the use of the following geographical components   RegionsAvailability ZonesEdge Locations  Wh…
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question