[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


error runtime 429

Posted on 2007-10-17
Medium Priority
Last Modified: 2013-12-27
...if i use the same code on a PC without Open Office the macro go in error in:
Set oSM = CreateObject("com.sun.star.ServiceManager")....

To run this code in a pc whitout Open Office is possible? tks.

Private Sub Command1_Click()
Dim oSM, oDesk, oDoc As Object 'OOo objects
Dim OpenParam(1) As Object 'Parameters to open the doc
Dim SaveParam(1) As Object 'Parameters to save the doc
Set oSM = CreateObject("com.sun.star.ServiceManager")
Set oDesk = oSM.createInstance("com.sun.star.frame.Desktop")
Set OpenParam(0) = MakePropertyValue("Hidden", True)  ' Open the file hidden
Set oDoc = oDesk.loadComponentFromURL("file:///C:/Documents and Settings/michel/dossier/general/excel/test.doc", "_blank", 0, OpenParam())
Set SaveParam(0) = MakePropertyValue("FilterName", "writer_pdf_Export")
Call oDoc.storeToURL("file:///C:/Documents and Settings/michel/dossier/general/excel/test.pdf", SaveParam())
Set oDesk = Nothing
Set oSM = Nothing
Unload Me
End Sub
'Automation/UNO bridge can't convert VB struct to UNO struct !
'cf http://api.openoffice.org/docs/DevelopersGuide/ProfUNO/ProfUNO.htm#1+4+4+5+3+Usage+of+Types
'Creates a sequence of com.sun.star.beans.PropertyValue s
'Original from DannyB
Public Function MakePropertyValue(cName, uValue) As Object
Dim oStruct, oServiceManager As Object
    Set oServiceManager = CreateObject("com.sun.star.ServiceManager")
    Set oStruct = oServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
    oStruct.Name = cName
    oStruct.Value = uValue
    Set MakePropertyValue = oStruct
End Function
Question by:sal21
1 Comment
LVL 14

Accepted Solution

xberry earned 2000 total points
ID: 20101799
Well, I thought a 'newbie' answer (newbie in VB and related) is better than no answer:
From pure logic I'd say the runtime error 429 says it all:
" Cause
This error message indicates that a required software component is not properly registered or installed."

You need components from Open Office but open office is not installed, thus
ActiveX component cannot create required object - EOF ; )

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question