Loading ...
Sorry, an error occurred while loading the content.

OnDocumentOpen macro not working?

Expand Messages
  • em315
    Here s a strange problem, and I wonder if anyone has any advice on how to fix it. In both my WPMacApp and in John Rethorst s SheepShaver-WP setup, the
    Message 1 of 3 , Mar 4, 2013
    • 0 Attachment
      Here's a strange problem, and I wonder if anyone has any advice on how to fix it.

      In both my WPMacApp and in John Rethorst's SheepShaver-WP setup, the OnOpenDocument macro no longer seems to do anything at all. That macro (if in Library(USA) or whatever) is supposed to run whenever you open or create or document. This certainly used to work, but no longer works - neither in my WPMacApp or (as far as I can tell) in John's SheepShaver-WP.

      Any suggestions will be very welcome.
    • em315
      Please ignore this message - the problem occurred because I was trying to open a document that already had an OnOpenDocument macro in it - the problem does not
      Message 2 of 3 , Mar 4, 2013
      • 0 Attachment
        Please ignore this message - the problem occurred because I was trying to open a document that already had an OnOpenDocument macro in it - the problem does not occur with normal documents. Apologies for wasting bandwidth on a non-problem!

        --- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
        >
        > Here's a strange problem, and I wonder if anyone has any advice on how to fix it.
        >
        > In both my WPMacApp and in John Rethorst's SheepShaver-WP setup, the OnOpenDocument macro no longer seems to do anything at all. That macro (if in Library(USA) or whatever) is supposed to run whenever you open or create or document. This certainly used to work, but no longer works - neither in my WPMacApp or (as far as I can tell) in John's SheepShaver-WP.
        >
        > Any suggestions will be very welcome.
        >
      • John R
        This can trip a lot of people up, that a macro of a given name can exist both in the Library and in a specific document. If so, the document macro takes
        Message 3 of 3 , Mar 4, 2013
        • 0 Attachment
          This can trip a lot of people up, that a macro of a given name can exist both in the Library and in a specific document. If so, the document macro takes priority.

          For this reason it's wise to use caution installing macros in documents. I use a New Document Template, in the Templates folder, that sets whatever you want for any new document. Instead of putting an OnOpenDocument macro in that template, whence it will be included in every new document, I use this structure for my Library OnOpenDocument macro:

          If (NewDocumentFlag)
          ; do if document has never been saved ("New Document Template" must exist in Templates folder)
          Else
          ; do if document is not new
          End If

          John R.


          --- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
          >
          > Please ignore this message - the problem occurred because I was trying to open a document that already had an OnOpenDocument macro in it - the problem does not occur with normal documents. Apologies for wasting bandwidth on a non-problem!
          >
          > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
          > >
          > > Here's a strange problem, and I wonder if anyone has any advice on how to fix it.
          > >
          > > In both my WPMacApp and in John Rethorst's SheepShaver-WP setup, the OnOpenDocument macro no longer seems to do anything at all. That macro (if in Library(USA) or whatever) is supposed to run whenever you open or create or document. This certainly used to work, but no longer works - neither in my WPMacApp or (as far as I can tell) in John's SheepShaver-WP.
          > >
          > > Any suggestions will be very welcome.
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.