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.