changing master on document stencil with automation

D

dani

Hi all

When editing the master in a document stencil, Visio always asks to
update all instances of this master when closing the edit master window.

Now, when editing the master in the document stencil with automation,
the master in the stencil will be changed without its instances being
updated.

How can I have the instances updated too with automation??

thanks

Daniel
 
D

dani

I just figured out that when deleting the document-stencil-master, then
the instances are updated.

Is there a method which I can call to update the instances without
having to delete the master??

what I concretely want to do is adding a new Row to the user section for
all of the instances...
 
D

David LACASSAGNE

I've read in some posts that you need to call the method Open on the
master before you perform the modifications.
And next you call method Close.

I have never tried this, but you can try it !

David.
 
M

Mark Nelson [MS]

Check out the help topic for Master.Open. Here is some of the text:

To edit the shapes and cells of a Master object from a program


1.. Open the Master object for editing by using masterObjCopy =
masterObj.Open. This code fails if there is a drawing window open into
masterObj or if other programs already have masterObj open. If the Open
method succeeds, masterObjCopy is a copy of masterObj.
2.. Change any shapes and cells in masterObjCopy, not masterObj.
3.. Close the Master object by using masterObjCopy.Close. The Close method
fails if masterObjCopy isn't a Master object that resulted from a prior
masterObj.Open call. Otherwise, the Close method merges the changes made in
step 2 from masterObjCopy back into masterObj. It also updates all instances
of masterObj to reflect the changes and update information cached in
masterObj. If masterObj.IconUpdate isn't visManual (0), the Close method
updates the icon shown in the stencil window for masterObj to depict an
image of masterObjCopy.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


David LACASSAGNE said:
I've read in some posts that you need to call the method Open on the
master before you perform the modifications.
And next you call method Close.

I have never tried this, but you can try it !

David.

"dani<->moser_a_t_hot<->mail.com" <"dani<->moser_a_t_hot<->mail.com">
 

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