🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10779

OpenOffice and OLE-automation

#10779
From: Robby Gebauer
Date: Sat, 13 Mar 2004 15:51
22 lines
1346 bytes
Hi,

I need some help with OpenOffice and OLE-automation. I have tried the
following code:

Variant svcmgr, desktop, doc;

svcmgr = CreateOleObject("com.sun.star.ServiceManager");
desktop = svcmgr.Exec(Procedure("createInstance") <<
"com.sun.star.frame.Desktop");
doc = desktop.Exec(Procedure("loadComponentFromURL") <<
"private:factory/swriter" <<  "_blank" << 0 << 0);

The last line produces an exception EOleError: variant doesn't reference an
OLE object.


How can help?

Thanks in advance.

Rob'
Technical Details
Message-ID: <40532c4a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2a2446f0ac2bd6ee,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-13 08:09:35 PST
From: "Robby Gebauer" <robby.gebauer@gmx.de>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: OpenOffice and OLE-automation
Date: Sat, 13 Mar 2004 16:51:54 +0100
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 145.254.174.200
Message-ID: <40532c4a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1079192650 145.254.174.200 (13 Mar 2004 07:44:10 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail