Update changes in master

J

John

Hi,

Following June's help last week, I'm now at the next stage of trying to
update the shape instances of a master that I've added a new custom property
to. But how should I go about this? (NB the "Match master by name on drop"
check box is checked)

Thanks

John


Sub AddMasterProps()

Dim mstr As Master


For Each mstr In ActiveDocument.Masters
Select Case mstr.Name
Case "Dog"

Case "Cat"
Call AddCustPropRow(mstr)
Case "Mouse"

Case Else

End Select
Next mstr

End Sub

Private Sub AddCustPropRow(ByRef mstr As Master)

Dim sName As String
Dim strRowRef As String

sName = "Temperament"
strRowRef = "Prop." & sName


mstr.Shapes.Item(1).AddNamedRow visSectionProp, sName, 0
rwIndx = mstr.Shapes.Item(1).Cells(strRowRef).Row
With mstr.Shapes.Item(1)
.CellsSRC(visSectionProp, rwIndx, visCustPropsLabel).FormulaU =
"""Temperament"""
.CellsSRC(visSectionProp, rwIndx, visCustPropsValue).FormulaU =
"""BadTempered"""
End With

'Add some form of update shapes

End Sub
 
D

David Parker

When you are editing masters, you need to use master.open to edit a copy of
the master, then use master.close (see the Developer help)
This will ensure that changes are propagated to the master instances.
However, this will not work if the shapesheet section of the instances have
already been edited locally.
 
Top