Please help.
Code: Select all
sub Main
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(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "URL"
args1(0).Value = "file:///home/user/Documents/cant_save_russiansaved.xls"
args1(1).Name = "FilterName"
args1(1).Value = "MS Excel 97"
dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1())
end sub