Edit Master Cells

J

John

Hi there,

Can anyone tell me why I can't do this:?

Dim shpText As Master

Set shpText = Application.ActiveDocument.Masters.Item("TextShp")

If ckNonPrinting.Value = True Then
shpText.CellsSRC(visSectionObject, visRowMisc,
visNonPrinting).Formula = "=True"
Else
shpText.CellsSRC(visSectionObject, visRowMisc,
visNonPrinting).Formula = "=False"
End If

I get an error saying object doesn't support method, but what's stopping me
changing shapesheet formulas in a master before I drop it onto the page?

Thanks in advance.

John
 
J

JuneTheSecond

A master consists of shapes. Cell ia a member of shape.
Your shpText is not a shape, but a master.
So, "shpText.CellsSRC(visSectionObject...." should be read as
"shpText.shapes(1).CellsSRC(visSectionObject...." , if the master consists
of only one shape.
 
D

David Parker [Visio MVP]

You should not edit a master directly in code, but instead create a clone
using master.Open, then close it
 
J

John

Hi David,

Thanks for this. I'll follow your advice and open the master before
changing its properties.

Best regards

John
 

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