Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenOffice and Mailmerge with Execute function

57 views
Skip to first unread message

DavLeMag

unread,
Jul 24, 2006, 5:57:15 AM7/24/06
to
Hi,
I try to mailmerge an OpenOffice document linked to a flat
file from a Powerbuilder application.
The execute function fails with this message : "Error
calling external object function execute at line 90..."

do you have any Idea please ? TIA

This is the code :

integer result, nInd

OLEObject oServiceManager
OLEObject oDesktop, oDocument, oProperty[0 to
6],oCoreReflection, oMailMerge
any aArgs[0 to 6]

oServiceManager = CREATE OLEObject
result =
oServiceManager.ConnectToNewObject("com.sun.star.ServiceManager")
oDesktop =
oServiceManager.createInstance("com.sun.star.frame.Desktop")
oMailMerge =
oServiceManager.createInstance("com.sun.star.text.MailMerge")

nInd = 0
oProperty[nInd] =
oServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
nInd = nInd + 1
oProperty[nInd] =
oServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
............................
nInd = nInd + 1 // nInd = 6
oProperty[nInd] =
oServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")

nInd = 0
oProperty[nInd].Name = "DataSourceName"
oProperty[nInd].Value = "Scop"
aArgs[nInd] = oProperty

nInd = nInd + 1
oProperty[nInd].Name = "CommandType"
oProperty[nInd].Value = 0
aArgs[nInd] = oProperty

nInd = nInd + 1
oProperty[nInd].Name = "Command"
oProperty[nInd].Value = "Dcir_scop"
aArgs[nInd] = oProperty

nInd = nInd + 1
oProperty[nInd].Name = "DocumentURL"
oProperty[nInd].Value =
"file:///C:/Sequoia32/document/Let_type/Scop/Parapheur/CircuitParaph/FeuilleRoute5Attrib.ott"
aArgs[nInd] = oProperty

nInd = nInd + 1
oProperty[nInd].Name = "OutputType"
oProperty[nInd].Value = 2
aArgs[nInd] = oProperty

nInd = nInd + 1
oProperty[nInd].Name = "OutputURL"
oProperty[nInd].Value = "file:///C:/Fusion/"
aArgs[nInd] = oProperty[nInd]

nInd = nInd + 1
oProperty[nInd].Name = "FilePrefixName"
oProperty[nInd].Value = "auto"
aArgs[nInd] = oProperty[nInd]

oMailMerge.Execute(aArgs)

oServiceManager.disconnectobject( )

//oDocument.storeAsURL("file:///C:/Fusion/montestole.odt",
aArgs)

//oDocument.Close(true);
//oDesktop.Terminate;

coco....@gmail.com

unread,
Nov 19, 2012, 5:59:53 AM11/19/12
to
Hello, did you find a solution to this problem??

bruce.a...@yahoo.com

unread,
Nov 26, 2012, 1:55:47 PM11/26/12
to
Most of the groups shown in Google are no longer active on the Sybase server. In addition, the remaining Sybase newsgroups will be shut down shortly. If you post here most people who take the time to answer questions will never see it.

Instead, post your question in the SAP Community Network (SCN) PowerBuilder Developer Center forums:

http://scn.sap.com/community/developer-center/powerbuilder/content?filterID=content~objecttype~objecttype[thread]
0 new messages