Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with Stencil Master Naming Problem

0 views
Skip to first unread message

Gary

unread,
Feb 23, 2007, 1:30:02 AM2/23/07
to
I have two master objects in my Stencil. The master names for each of them
are Z-R.2 and Y-R.2

When I select the master object in the Stencil and check the master name,
they are Z-R.2 and Y-R.2 for them. I am using VBA Code in MS Access to
drop the master object onto my visio application. Below is what I do:

Application.ActiveWindow.Page.Drop
Application.Documents.Item("C:\Stencils\Stencil_R1.vss").Masters.ItemU("Y-R.2"), 1.5, 1.0625

This is what I expected, because the recorder reference it by the master
name of Y-R.2


The problem is this one.

Application.ActiveWindow.Page.Drop Application.Documents.Item
("C:\Stencils\Stencil_R1.vss").Masters.ItemU("Master.5"), 1.375, 2#

Instead of using Z-R.2 master name, the record shows Master.5. What do I
need to do the change my stencil master to be called by Z-R.2 ??? The master
name shows this.

Can Some One Please Help.


Gary

JuneTheSecond

unread,
Feb 23, 2007, 3:55:05 AM2/23/07
to
Masters collection does not have ItemFromNameU property.
My ides is to use for each loop, for example,
Dim ms as Master
For Each ms In doc.Masters
Debug.Print ms.NameU
If ms.NameU = "Measure tool" Then
ActivePage.Drop ms, 4, 4
End If
Next
--
JuneTheSecond

Gary

unread,
Feb 23, 2007, 10:08:07 AM2/23/07
to
Can you help explain how I luck out in the first case?? Is there a way to
repeat what I had the first time without writing this loop for all??

Thanks,

Gary

Mark Nelson [MS]

unread,
Feb 24, 2007, 12:22:11 AM2/24/07
to
You may have a master with local name = "Z-R.2" and a universal name =
"Master.5". Check the Master.Name and Master.NameU properties to confirm
this. Then programmatically set the Name and NameU properties to the same
thing.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

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

"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:7739BF37-30BD-4979...@microsoft.com...

0 new messages