While waiting for decisions from his 6 university choices, Ed sees a
message from Edward S. Sulzer <Edward S.
(e-mail address removed)>. On it is written:
I am trying to send output into a predesigned publisher form. For
certain shapes in the form, when I try to write data to it, it says
"Permission Denied" Any idea on what shapes or properties are causing
this? and no, the document is not readonly.
To edit the contents of a shape, the shape must be on the currently selected
page - i.e. Shape.Parent must be equal to ActivePage
So, if you're editing a particular shape within a publication at the click
of a CommandBarButton (so you won't know alread which page it's on), you can
use this code:
Dim MyShape As Publisher.Shape
Sub EditShape()
Set ActiveDocument.ActiveView.ActivePage = MyShape.Parent
'Do manipulation of shape
End Sub
If you want to be a little more polite to the user and return him/her to the
page he/she was on, you can add a couple of lines like this:
Dim MyShape As Publisher.Shape
Sub EditShapeAndReturn()
Dim aPage as Publisher.Page
Set aPage = ActiveDocument.ActiveView.ActivePage
Set ActiveDocument.ActiveView.ActivePage = MyShape.Parent
'Do manipulation of shape
Set ActiveDocument.ActiveView.ActivePage = aPage
End Sub