Off-sheet Reference Page Numbering

Started by cthomas, December 03, 2012, 08:38:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cthomas

Hi there,

I'm currently using Visio 2010 Professional.

I'm trying to create an off-sheet reference shape that displays the page number of the hyperlink it points to.

So far, all I can do is get it to show the page name. I have edited a master so it shows it automatically.

1) Edit the off-sheet label master
2) Open shape sheet. Add section; shape data, hyperlinks
3) In Shape Data, Prop.row_1, value, put in =Hyperlink.OffPageConnector.SubAddress
4) Add a field to the shape that shows the shape data

Is there anyway I can show the page number instead of the page name? Any help would be great

Thanks in advance!  :)

cthomas

I have tried using the formula from Hyperlinks: SubAddress in the ShapeData: Value cell, but cannot get it to work?

In ShapeData: Value
=Pages[(Hyperlink.OffPageConnector.SubAddress)]!ThePage!PAGENAME()

But it doesn't work either. How can I take the output string of Hyperlink.OffPageConnector.SubAddress and use it in the formula above?

JohnGoldsmith

The Pages syntax means that you have to use a string inside the square brackets - Visio won't evaluate the page name. 

However you can push that formula into another cell and reference that instead.  If you look at the image below, I've added three User cells.  The one doing the main work is User.PageNumberPush, which uses a SETF function to push that concatenated formula into User.RawDestinationPageNumber.  The reason I've named that cell 'Raw' is that if the Page name in the Hyperlink sub address cell can't be evaluated the SETF function will not work and the cell errors.  Under this error situation the Raw cell will not be updated and will give a incorrect value (the one previously set).  To get around this a third cell (User.CoercedDestinationPageNumber) tests whether User.PageNumberPush is in error and, if it is, will return a blank string and, if not, returns the page number.  You can then reference this cell in your inserted field.

It's a shame that you can't use GUIDs using Pages[... syntax as the destination page GUID is just sitting there waiting, and if you're using code, then I'd use that instead.

Hope that helps.

Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

cthomas

Thanks John! This works perfectly!

Cheers for your help

cthomas

I have one more question.

Is it possible to add an extra text box to the off-sheet connector? So that it will have the page number on the left, and then a text box which I can type a description into on the right?

When I add the text box the on drop formula stops working?

Thanks in advance again!

JohnGoldsmith

You'd have to first convert the shape to a group (see the option under the group menu) and then add the extra rectangle to the group.  You might want to ensure LockCalcWH cell is set to 1 before adding the sub-shape too. 

You could then add your inserted field to the sub-shape and reference the User cell in the parent group shape.
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

pevi01

This works perfectly; Thanks.

but there is one small problem; after adding additional pages, the pagenumbers are not changing.
Maybe you have also a solution for this issue

Thanks in advance

Surrogate

#7
Pagenumbers not update because Hyperlink.OffPageConnector.SubAddress not change! Оff-sheet reference shape still at page, which was last in previous version of document ?