Catching events

P

PKSpence

Can someone provide an example of event notification in Visio? Apparently
neither the Document or Page objects expose a OnBefore_Print event, or
something similar. I'm needing to change the page title of each page before
it's printed. This is to get around the apparent 30-character limit for page
names.
 
C

Chris Roth [ Visio MVP ]

The event log shows this when printing:

BeforeModal
AfterModal
EnterScope Print [1010;0;Print]
<ExitScope Print [1010;0;Print]

Which doesn't look like much use, as far as catching any useful events.

You can replace the print command in the MenuItem and ToolBarItem objects
that call print by manipulating Visio's UI object.

What IS the problem with printing? I could make a page name very long, and
still print it out. What problem are you having?

--

Hope this helps,

Chris Roth
Visio MVP
 
P

PKSpence

When I change the name of an existing page, or create a new page, I can only
enter 31-characters as the page name. Any characters after the 31st are
ignored. BTW, I'm using Visio EA SP2, if that makes any difference.


Chris Roth said:
The event log shows this when printing:

BeforeModal
AfterModal
EnterScope Print [1010;0;Print]
<ExitScope Print [1010;0;Print]

Which doesn't look like much use, as far as catching any useful events.

You can replace the print command in the MenuItem and ToolBarItem objects
that call print by manipulating Visio's UI object.

What IS the problem with printing? I could make a page name very long, and
still print it out. What problem are you having?

--

Hope this helps,

Chris Roth
Visio MVP


PKSpence said:
Can someone provide an example of event notification in Visio? Apparently
neither the Document or Page objects expose a OnBefore_Print event, or
something similar. I'm needing to change the page title of each page
before it's printed. This is to get around the apparent 30-character
limit for page names.
 
D

David Parker [Visio MVP]

That is because you have reached the limit for page names.

PKSpence said:
When I change the name of an existing page, or create a new page, I can
only enter 31-characters as the page name. Any characters after the 31st
are ignored. BTW, I'm using Visio EA SP2, if that makes any difference.


Chris Roth said:
The event log shows this when printing:

BeforeModal
AfterModal
EnterScope Print [1010;0;Print]
<ExitScope Print [1010;0;Print]

Which doesn't look like much use, as far as catching any useful events.

You can replace the print command in the MenuItem and ToolBarItem objects
that call print by manipulating Visio's UI object.

What IS the problem with printing? I could make a page name very long,
and still print it out. What problem are you having?

--

Hope this helps,

Chris Roth
Visio MVP


PKSpence said:
Can someone provide an example of event notification in Visio?
Apparently neither the Document or Page objects expose a OnBefore_Print
event, or something similar. I'm needing to change the page title of
each page before it's printed. This is to get around the apparent
30-character limit for page names.
 
P

PKSpence

Duh?! That's the reason for my original post. I was hoping there was a way
around this by trapping a Page_OnPrint event, or something similar, so I can
change it as each page is printed. Evidently neither the Visio document or
page object exposes an OnPrint event. Even when considering Visio Event
Objects, there seems to be no command ID associated with printing.
Considering the object model of M$ products, this seems like a major
oversight to me.


David Parker said:
That is because you have reached the limit for page names.

PKSpence said:
When I change the name of an existing page, or create a new page, I can
only enter 31-characters as the page name. Any characters after the 31st
are ignored. BTW, I'm using Visio EA SP2, if that makes any difference.


Chris Roth said:
The event log shows this when printing:

BeforeModal
AfterModal
EnterScope Print [1010;0;Print]
<ExitScope Print [1010;0;Print]

Which doesn't look like much use, as far as catching any useful events.

You can replace the print command in the MenuItem and ToolBarItem
objects that call print by manipulating Visio's UI object.

What IS the problem with printing? I could make a page name very long,
and still print it out. What problem are you having?

--

Hope this helps,

Chris Roth
Visio MVP


Can someone provide an example of event notification in Visio?
Apparently neither the Document or Page objects expose a OnBefore_Print
event, or something similar. I'm needing to change the page title of
each page before it's printed. This is to get around the apparent
30-character limit for page names.
 
D

David Parker [Visio MVP]

.... Still don't understand why you need to try to use more than 31 chars.

PKSpence said:
Duh?! That's the reason for my original post. I was hoping there was a way
around this by trapping a Page_OnPrint event, or something similar, so I
can change it as each page is printed. Evidently neither the Visio
document or page object exposes an OnPrint event. Even when considering
Visio Event Objects, there seems to be no command ID associated with
printing. Considering the object model of M$ products, this seems like a
major oversight to me.


David Parker said:
That is because you have reached the limit for page names.

PKSpence said:
When I change the name of an existing page, or create a new page, I can
only enter 31-characters as the page name. Any characters after the 31st
are ignored. BTW, I'm using Visio EA SP2, if that makes any difference.


message The event log shows this when printing:

BeforeModal
AfterModal
EnterScope Print [1010;0;Print]
<ExitScope Print [1010;0;Print]

Which doesn't look like much use, as far as catching any useful events.

You can replace the print command in the MenuItem and ToolBarItem
objects that call print by manipulating Visio's UI object.

What IS the problem with printing? I could make a page name very long,
and still print it out. What problem are you having?

--

Hope this helps,

Chris Roth
Visio MVP


Can someone provide an example of event notification in Visio?
Apparently neither the Document or Page objects expose a
OnBefore_Print event, or something similar. I'm needing to change the
page title of each page before it's printed. This is to get around the
apparent 30-character limit for page names.
 

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