Hello!
How can I connect to LibreOffice and open a file with OLEobject?
Like to the OpenOffice with this:
Set oSM = CreateObject("com.sun.star.ServiceManager")
Set oDesk = oSM.createInstance("com.sun.star.frame.Desktop")
Set oDoc = oDesk.loadComponentFromURL("private:factory/swriter", "_blank", 0, arg())
Thanks!
LibreOffice Connect
LibreOffice Connect
LibreOffice 3.3.2 on WinXp
Re: LibreOffice Connect
Have you tried? Syntax should be the same.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: LibreOffice Connect
Yes. I uninstalled the OpenOffice and Install the LibreOffice and it doesn't work.RoryOF wrote:Have you tried? Syntax should be the same.
LibreOffice 3.3.2 on WinXp
Re: LibreOffice Connect
Can you / File / Insert Object : Ole Object directly in a file. If not, the functionality may not be there.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: LibreOffice Connect
RoryOF wrote:Can you / File / Insert Object : Ole Object directly in a file. If not, the functionality may not be there.
You are right!
I tried it another machine where I installed only the LibreOffice and it's work!
Thank you!
LibreOffice 3.3.2 on WinXp
Re: LibreOffice Connect
In that case, I suggest removing LibreOffice and OpenOffice traces using Revo Uninstaller at its most aggressive settings, then reinstalling LibreOffice.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: LibreOffice Connect
Final update. Installed LibreOffice 5.2.5.1 and the problem seems to have been resolved.
============8<----- previous post follows ----->8==========
Top-posting what may be an answer, though sad. <https://ask.libreoffice.org/en/question ... eoffice-5/> indicates that x64 fails but x86 succeeds. Manually invoked, the .exe runs fine.
============8<----- original post follows ----->8==========
I find myself a latecomer to this problem.
Windows 7 Professional; SP1; 64-bit.
LibreOffice Version: 5.1.3.2 (x64)
Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
CPU Threads: 8; OS Version: Windows 6.1; UI Render: default;
Locale: en-US (en_US)
I find suitable cross-references from HKEY_CLASSES_ROOT\com.sun.star.ServiceManager to an HKEY_CLASSES_ROOT/CLSID/{<signature>}/LocalServer32 whose value is "C:\Program Files\LibreOffice 5\program\soffice.exe --nodefault --nologo" and whose other keys and values look right.
To my knowledge, this machine has not had OpenOffice on it, only LibreOffice. Insert->Object->OLE Object->[I chose LibreOffice 5.1 Drawing] worked as expected, but my diff-odt.vbs script (for TortoiseHg diff) runs OK until
when it reports in a popup
============8<----- previous post follows ----->8==========
Top-posting what may be an answer, though sad. <https://ask.libreoffice.org/en/question ... eoffice-5/> indicates that x64 fails but x86 succeeds. Manually invoked, the .exe runs fine.
============8<----- original post follows ----->8==========
I find myself a latecomer to this problem.
Windows 7 Professional; SP1; 64-bit.
LibreOffice Version: 5.1.3.2 (x64)
Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
CPU Threads: 8; OS Version: Windows 6.1; UI Render: default;
Locale: en-US (en_US)
I find suitable cross-references from HKEY_CLASSES_ROOT\com.sun.star.ServiceManager to an HKEY_CLASSES_ROOT/CLSID/{<signature>}/LocalServer32 whose value is "C:\Program Files\LibreOffice 5\program\soffice.exe --nodefault --nologo" and whose other keys and values look right.
To my knowledge, this machine has not had OpenOffice on it, only LibreOffice. Insert->Object->OLE Object->[I chose LibreOffice 5.1 Drawing] worked as expected, but my diff-odt.vbs script (for TortoiseHg diff) runs OK until
Code: Select all
On Error Resume Next
'The service manager is always the starting point
'If there is no office running then an office is started
Set objServiceManager = Wscript.CreateObject("com.sun.star.ServiceManager")
If Err.Number <> 0 Then
Wscript.echo "diff-odt: You must have OpenOffice installed to perform this operation." & _
vbCrLf & "(" & Hex(Err.Number) & " " & Err.Description & ")"
Wscript.Quit 1
End If
This happens whether LibreOffice is already running or not. All other net searches indicate that this should "just work" if everything else works.diff-odt: You must have OpenOffice installed to perform this operation.
(8000FFFF Could not create object named "com.sun.star.ServiceManager".)
AOO3.4 on Windows XP and Ubuntu 10.04