On 1 Jun 2007 at 18:25, TerryJ wrote:
...
> > The title is the error message I'm receiving, in a message box with > > 
> > some not-useful clutter.
> > 
...
> > However, when starting with the -pt flag (so running without the GUI), 
> > I get an error message popping up with that title gem. The print-to-PDF 
> > proceeds correctly after I dismiss the message box, but of course 
> > there's no .doc output file.
...
> The error means that the script is not being found.  Have you changed the
> location or the sub name since making the assignment?  In any case, I would
> remove the assignment and assign it again.  Wait : 
> 
> (Light flickers dimly.)  Where is the macro located?  If it is in a library
> other than 'Standard' (or a library of the document from which you are
> running it - unlikely), that library is not loaded.  Put it in the
> 'Standard' library.  Otherwise, you need a macro in the 'Standard' library
> which loads the library containing the macro AND executes a script in that
> library.
> 
> The Standard library loads when OOo is launched.  It is possible you will
> have to re-launch after moving the script to 'Standard' but, IIRC, it is
> unnecessary.

Thanks for the reply.  I've had another play about with "my" macro with 
no success.

The module was indeed stored in a library within the document in 
question, but not "Standard".  I've tried moving it to Standard, not 
expecting any change - and my expectations have been fulfilled. Running 
interactively works fine, but with -pt on the command line, just the 
error message.

I've also tried assigning the same macro to 'document open'. Again, 
works fine when the gui will appear; fails when using -p from the 
command line. I only get the one error message even when the macro is 
assigned to both functions; a feature I assume.

However, serendipity still rules apparently :-)  By accident I came 
across the web page http://www.xml.com/pub/a/2006/01/11/from-microsoft-
to-openoffice.html, which gives full directions for what I'm really 
trying to achieve - automatic conversion from OOo to .doc and .pdf from 
the command line.  That works fine, /provided/ the relevant macros are 
stored in the user's OOo library but /not/ within the document (I tried 
both, as that site asumes they're in the My Macros area). So I assume 
there's something weird about macro availability when the document is 
opened without a GUI -- which sounds like a bug to me.

Anyway, problem sorted (for now), and thanks again for the help. It's 
an enormous help to know one's not working in a vacuum :-)


(Oh, I forgot say in the original posting that, this is all with OOo 
2.2.0)

-- 
various incoming sites blocked because of spam; see 
http://www.scottsonline.org.uk for a list and openpgp crypto key
(key fingerprint 2ACC 9F21 5103 F68C 7C32 9EA8 C949 81E1 31C9 1364)
[EMAIL PROTECTED]    Mike Scott, Harlow, Essex, England

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to