Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Publisher / Programming / November 2004

Tip: Looking for answers? Try searching our database.

VB6 & Publisher file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Edward S. Sulzer - 19 Nov 2004 20:31 GMT
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.

Thanks for the help
Ed Bennett - 20 Nov 2004 16:30 GMT
While waiting for decisions from his 6 university choices, Ed sees a
message from Edward S. Sulzer <Edward S.
Sulzer@discussions.microsoft.com>. 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

Signature

Ed Bennett - MVP Microsoft Publisher
http://www.mvps.org/the_nerd/
Before reading this message, view the disclaimer:
http://mvps.org/the_nerd/disclaim.htm


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.