Get pagename from other pages

M

MDelisle

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.
 
J

John Goldsmith

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
 
M

MDelisle

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
John Goldsmith said:
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

MDelisle said:
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.
 
D

David Parker

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

MDelisle said:
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
John Goldsmith said:
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

MDelisle said:
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.
 
J

John Goldsmith

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

David Parker said:
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

MDelisle said:
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
John Goldsmith said:
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.
 
M

MDelisle

So, if I understand, without VB code, I am not able to extract page names
from other pages to be listed on another page.

John Goldsmith said:
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

David Parker said:
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

MDelisle said:
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.
 
J

John Goldsmith

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

MDelisle said:
So, if I understand, without VB code, I am not able to extract page names
from other pages to be listed on another page.

John Goldsmith said:
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

David Parker said:
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.
 
M

MDelisle

I have add a user cell called User.Pagename with =Pagename() formula on page
called "412-001-r0", I went to first page called "All Model" and add a shape
(a "Text annotation" shape) in which I have tried to add a custom formula
defined as "=Pages[412-001-r0]!ThePage!User.Pagename" but without succes.

John Goldsmith said:
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

MDelisle said:
So, if I understand, without VB code, I am not able to extract page names
from other pages to be listed on another page.

John Goldsmith said:
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.
 
J

John Goldsmith

Morning,

When you say without success, do you mean the formula produces an error or
you get an unexpected result?

The first thing to do is check what part of the formula isn't working, so
try changing the formula to a more permenant result such as:

=Pages[412-001-r0]!ThePage!PageWidth

Does this produce the expected result? If it doesn't then you're not
getting the correct reference to the page, but if it does then you can move
on to the latter part of the formula.

To check the latter part confirm that the cell you're trying to reference is
actually there (I assume it is but we need to be logical in hunting down the
problem). So right-click on page 412-001-r0 and confirm that User.Pagename
exists and is spelt correctly (or at least consistently).

If that's ok check the value is producing the desired results by
right-clicking on the ShapeSheet and selecting "Values" (you can change this
back afterwards by clicking "Formulas"). What is the value of this cell?

Let me know the results.

Best regards

John


John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk

MDelisle said:
I have add a user cell called User.Pagename with =Pagename() formula on
page
called "412-001-r0", I went to first page called "All Model" and add a
shape
(a "Text annotation" shape) in which I have tried to add a custom formula
defined as "=Pages[412-001-r0]!ThePage!User.Pagename" but without succes.

John Goldsmith said:
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

MDelisle said:
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.
 
M

MDelisle

I got "Error in formula". Even with Pagewidth so it look like that he
reference to "412-001-01" is wrong. To verify I have add a new page
"Page-56" and test it and it is working. So now my problem is how can I
find the correct reference to the page called "412-001-01"?

Thanks for help, I own you some beer!!!

John Goldsmith said:
Morning,

When you say without success, do you mean the formula produces an error or
you get an unexpected result?

The first thing to do is check what part of the formula isn't working, so
try changing the formula to a more permenant result such as:

=Pages[412-001-r0]!ThePage!PageWidth

Does this produce the expected result? If it doesn't then you're not
getting the correct reference to the page, but if it does then you can move
on to the latter part of the formula.

To check the latter part confirm that the cell you're trying to reference is
actually there (I assume it is but we need to be logical in hunting down the
problem). So right-click on page 412-001-r0 and confirm that User.Pagename
exists and is spelt correctly (or at least consistently).

If that's ok check the value is producing the desired results by
right-clicking on the ShapeSheet and selecting "Values" (you can change this
back afterwards by clicking "Formulas"). What is the value of this cell?

Let me know the results.

Best regards

John


John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk

MDelisle said:
I have add a user cell called User.Pagename with =Pagename() formula on
page
called "412-001-r0", I went to first page called "All Model" and add a
shape
(a "Text annotation" shape) in which I have tried to add a custom formula
defined as "=Pages[412-001-r0]!ThePage!User.Pagename" but without succes.

John Goldsmith said:
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.
 
P

Paul Herber

I got "Error in formula". Even with Pagewidth so it look like that he
reference to "412-001-01" is wrong. To verify I have add a new page
"Page-56" and test it and it is working. So now my problem is how can I
find the correct reference to the page called "412-001-01"?

Perhaps the page Name and NameU are different.
http://www.visio-utilities.sandrila.co.uk/
and use the menu SuperUtils -> Page -> Page Report
that will give you the page's Name and NameU and offer to correct and
difference.
 
M

MDelisle

Yes, the Name's page and NameU's page are different. For the name
"412-001-r0", the nameU is "412-001rF", we received an update of the PID
revision during I have building my visio project. I have tried the syntax
with "412-001rf" and PageWidth and work but I try with Pagename but get again
"Error in Formula".
 
M

MDelisle

I have replace the Name by the NameU and
"=Pages[412-001-r0]!ThePage!PageWidth" works now instead of
"Pages[412-001rF]!ThePage!PageWidth.

After this, my first tentative with Pagename did not work vut I realize that
I should use User.Pagename.

YEAH we did it. I own you lot of beer. Let me know if you come to
Montreal!!!!
 

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