Morten Bo Johansen wrote:
Hi Terry,
Terry <[EMAIL PROTECTED]> wrote:
You need to insert something like the following before your line
defining the dispatcher ( dispatcher = etc )
[...]
Thanks for this, it worked. However, it just occurred to me that what I
really wanted to do was to export the sheet as (x)html ;) However, with
your tips, I can probably figure out how to do that. Unfortunately, at
the moment it appears that there is a bug in the File -> Export -> XHTML
function in my version (2.0.4 on Linux). Executing this function freezes
OO. I wonder if there are any alternative ways of exporting to (x)html
that I could use in a macro, without having to access the function in the
menu?
Thanks,
Morten
Hi. Several times a day, it seems, I discover another reason for
staying with 2.0.2.
I've recorded exporting to xhtml. The code is below. I wondered
whether that was your intention.
I stepped back from looking into the StarBasic way of doing this without
the dispatcher but I think you would use ThisComponent.storeToUrl.
Anyway, the process was recorded as follows:
sub recExportXhtml
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "URL"
args1(0).Value = "file:///home/terry/Data/WorkRef/Test/Test.xhtml"
args1(1).Name = "FilterName"
args1(1).Value = "XHTML Calc File"
args1(2).Name = "SelectionOnly"
args1(2).Value = true
dispatcher.executeDispatch(document, ".uno:ExportTo", "", 0, args1())
end sub
--
If you're seeking, check out http://www.rci.org.au
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]