Set window caption

E

EE

I have tried to modify the Window Caption using :
ActiveWindow.Caption = "123"
But all I get is a run-time error: "Invalid window type for this action"
Does anyone know what the problem may be, and if there is a solution ?
 
J

JuneTheSecond

Caption of active window seems to be protected, but you could change caption
if you save the document as "save as".
 
C

Chris Roth [MVP]

I seem to remember something about being able to hack this with API calls,
but I think Visio updates it often, so you'd have to keep setting it as
well. I can't remember the details, though.

--
Hope this helps,

Chris Roth
Visio MVP

More Visio shapes, articles, development info and pure diagramming fun at:
www.wanderkind.com/visio
 
E

EE

What do you meen by "API calls", calling Windows directly ?
How do I do this from VBA ? Can you point me to an example ?
 
C

Chris Roth [MVP]

Yeah, sometimes called Win Api, it's a way to directly call windows
functions.

Here's an article that might help:

http://www.allapi.net/vbtutor/iapi2.shtml

I think there's a function SetWindowCaption, but I'm not sure. There
certainly is a GetWindowCaption...

--
Hope this helps,

Chris Roth
Visio MVP

More Visio shapes, articles, development info and pure diagramming fun at:
www.wanderkind.com/visio
 

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