mike scott-2 wrote:
>
> The title is the error message I'm receiving, in a message box with
> some not-useful clutter.
>
> I'm attempting an automated document conversion from OOo to word
> format, presently under XP for testing, while the final target wil be
> freebsd. To this end, I have a macro (cobbled together from bits found
> on the net) that will save the current document as a ms word document.
> This is stored in a library within the document, and I have the macro
> assigned to execute when the document is printed ("Bullzip PDF Printer"
> is how I make a pdf, also required) - it works fine interactively.
>
> 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.
>
> Am I attempting something unreasonable here, or is there some arcane
> reason why this won't work?
>
>
> FWIW the macro is (from /somewhere/ on the 'net plus a mod or two!!)
>
> Sub StoreAsDOC
> Dim oDoc As Variant
> oDoc = ThisComponent
>
> oDoc.storeToURL( "file:///c|/temp/output1.doc", Array(
> MakePropertyValue( "FilterName", "MS Word 97" ) )
>
> End Sub
>
> Function MakePropertyValue( Optional cName As String, Optional uValue )
> As com.sun.star.beans.PropertyValue
> oPropertyValue = createUnoStruct( "com.sun.star.beans.PropertyValue"
> )
> If Not IsMissing( cName ) Then
> oPropertyValue.Name = cName
> EndIf
> If Not IsMissing( uValue ) Then
> oPropertyValue.Value = uValue
> EndIf
> MakePropertyValue() = oPropertyValue
>
> End Function
> --
> 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
>
>
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.
--
View this message in context:
http://www.nabble.com/BasicProviderImpl%3A%3AgetScript%3A-no-script%21-tf3853176.html#a10923019
Sent from the openoffice - users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]