ник: Дядя Федор
А так (или надо ОО сам по себе запустить?)
'---------------------------------------------------------------------------------------
' Module : OOO
' DateTime : 22.10.2010 15:51
' Author : ДФ по мотивам
' http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html#from_msoffice_to_ooo
' для Excel ссылка
' http://hiprog.com/index.php?option=com_content&task=view&id=251661586&Itemid=35
'---------------------------------------------------------------------------------------
Option Compare Database
Option Explicit
Sub openDoc()
'
'Load an existing writer document, with opening parameters
'
Dim oSM, oDesk As Object 'root object from OOo API
Dim oDoc As Object 'The document to be opened
Dim OpenPar(2) As Object 'a Visual Basic array, with 3 elements
Dim s As String
'создаем новый ServiceManager
Set oSM = CreateObject("com.sun.star.ServiceManager")
Set oDesk = oSM.createInstance("com.sun.star.frame.Desktop")
'We call the MakePropertyValue function, defined just before, to access the structure
Set OpenPar(0) = MakePropertyValue("ReadOnly", True)
Set OpenPar(1) = MakePropertyValue("Password", "secret")
' *******
Set OpenPar(2) = MakePropertyValue("Hidden", False) 'вот здесь можно true
' *******
s = "file:///d:/sample111.odt"
'Now we can call the OOo loadComponentFromURL method, giving it as
'fourth argument the result of our precedent MakePropertyValue call
Set oDoc = oDesk.loadComponentFromURL(s, "_blank", 0, OpenPar())
' ...
End Sub
а ваще зачем ОО запускать ? В АВТОЗАГРУЗКУ ЕГО.