Putting a Text automatically

C

CyberBhai

I have about 400 vsd files. I want to put a text in all the files towards the
bottom right corner. How can I do that by using some automated means ?
 
C

Chris Roth [MVP]

This will put a rectangle on the bottom-right of every page in a document:

Dim pg as Visio.Page
Dim shp as Visio.Shape
For Each pg in Visio.ActiveDocument.Pages

set shp = pg.DrawRectangle(0,0,1,1)
shp.Cells("Width").Formula = "TextWidth(TheText)"
shp.Cells("Height").Formula = "TextHeight(TheText, Width)"
shp.Cells("LocPinX").Formula = "Width*1.0"
shp.Cells("LocPinY").Formula = "Height*0"
shp.Cells("PinX").Formula = "ThePage!PageWidth"
shp.Cells("PinY").Formula = "0"

shp.Text = "My Text Here"

Next pg

--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top