Shapesheet

M

Matt

Is there a way to chage the shapesheet address cell for all hyperlinks at one
time in a visio file? I have about 500 links that need to have the address
cell content deleted and would prefer not to have to go into each one.
thanks for your help
Matt
 
J

John Goldsmith

Hi Matt,

Have a go with the following code, which will run through all of the shapes
in your document and set the address cell to "" irrespective of the type of
hyperlink (let me know if they're not all the same):

Sub ResetLinkAddressCells()
Dim shp As Shape
Dim pag As Page
Dim i As Integer
For Each pag In ThisDocument.Pages
For Each shp In pag.Shapes
If shp.SectionExists(visSectionHyperlink, 0) = True Then
For i = 0 To shp.Section(visSectionHyperlink).Count - 1
shp.CellsSRC(visSectionHyperlink, i,
visHLinkAddress).FormulaU = ""
Next i
End If
Next shp
Next pag
End Sub

To run the above code try the following:

1) Create a copy of your document (just to ensure you're happy with the
results).

2) Press alt+F11 to open the VBA editting window (VBE).

3) In the VBE click Insert / Module and paste the code above into the new
blank area on the right.

4) Press F5 to run the procedure and then check the results in the
shapesheet (it should say "No Formula").

Hope that helps.

Best regards

John

John Goldsmith
www.visualSignals.co.uk
 

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