error runtime 429

...if i use the same code on a PC without Open Office the macro go in error in:
Set oSM = CreateObject("")....

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("")
Set oDesk = oSM.createInstance("")
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 !
'Creates a sequence of s
'Original from DannyB
Public Function MakePropertyValue(cName, uValue) As Object
Dim oStruct, oServiceManager As Object
    Set oServiceManager = CreateObject("")
    Set oStruct = oServiceManager.Bridge_GetStruct("")
    oStruct.Name = cName
    oStruct.Value = uValue
    Set MakePropertyValue = oStruct
End Function
Who is Participating?
xberryConnect With a Mentor Commented:
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 ; )
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.