Well what David and I were saying was that you can't reference a page by
index to get its name. However to get a list of page names on one page
you
could try the following:
1) Add a User cell to each page (right click on the page, Show ShapeSheet
and then insert a User section if it doesn't exist already) called
User.Pagename and use the =PAGENAME() formula.
2) Drop a shape onto you main page and insert a field
(=Pages[Page-2]!ThePage!User.Pagename) for each of your pages using the
Insert / Field... / Custom formula category. Note that you'll have to
change "Page-2" to whatever your page name is for each respective formula
and page.
Best regards
John
John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
So, if I understand, without VB code, I am not able to extract page
names
from other pages to be listed on another page.
:
Hi M,
Yes, I'm not suggestion Page-1 be used as an index (or Page-7 for that
matter) but only as a name. So if you haven't changed the default
names
then you could use say "Page-1", but if you've changed your page name
to
"MyName" then that's the way you need to reference it.
Using your example the syntax should be as follows:
"Pages[440-001-r0]!ThePage!PageWidth"
Best regards
John
John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
M
Actually, you cannot retrieve the name of a page from its index via
a
ShapeSheet formula. You would need to use code for this.
This is because there are several different types of pages in
Visio -
foreground, background and reviewers; and you can change the order
and
visibility of them.
D
Hi I try to use the syntax "Pages[Page-1]!ThePage!PageWidth" inside
a
formula
but do not recognize it. My pages are named now : "440-001-r0",
"440-002-r0"
etc. Should I use instead "Pages[Page-1]!440-001-r0!PageWidth"?
This
did
not
work as well.
Also, is it "PageWidth" should we use to get the name? This should
not
give
us instead the width defined for this page.
Regards
:
Hello M,
The PAGENAME() function returns the name of the page where it is
used,
not
the active page. So, for example, if you had a Master shape with
a
User
cell named User.Pagename that contained the =PAGENAME() and then
dropped
this shape onto "Page-1", "Page-2" and "Page-3", you could then
inspect
the
value of each instance shape and find the respective page name in
each
User
cell.
The "Pages" shapesheet syntax (eg
=Pages[Page-1]!ThePage!PageWidth)
only
takes the page name as far as I'm aware. However even if you
reference
Page-7 and then a user changes the page name the formula would
continue
to
work as Visio will use the Universal page name.
For reference, the page naming works as follows:
1) Insert a new page, which will have a default name of "Page-n"
(At
this
stage both the local and universal names will be "Page-n").
2) User changes page name to "MyFirstPageName" (Again both the
local
and
universal names will be "MyFirstPageName").
3) User changes page name again to "MySecondPageName" (Now the
local
name is
changed "MySecondPageName", but the universal name remains
"MyFirstPageName").
All subsequent page name changes will only effect the local name
(unless
the
universal name (NameU) is changed via code) and Visio will only
use
the
universal name within ShapeSheet formulae (2003 onwards).
Anyway, I think reading between the lines (and previous posts),
you
should
be adding a User cell to your shape Masters that will allow you to
report
your shapes' page names, but let me know if I've not anwsered the
question
properly for you.
Here also is a link on cell reference that you might find useful
if
you
haven't spotted it before:
http://msdn2.microsoft.com/en-us/library/aa200961(office.10).aspx#572
Best regards
John
John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
How can I get the page name from other pages when you work on a
specific
page? I know that Pagename() give you the active page on which
we
actually
work but I look for the statement to get the page name of the
third
and
seventh pages available on my visio project.