| View previous topic :: View next topic |
| Author |
Message |
LoIc Newbie

Joined: 11 Apr 2004 Posts: 3
|
Posted: Sun Apr 11, 2004 2:47 am Post subject: LoadComponentFromUrl and VB.NET |
|
|
Hi,
I'm trying to use OpenOffice with VB.NET but I've got a little problem. When I try to execute the command LoadComponentFromUrl I've got this error "Type Mismatch". Here is my syntax :
Dim objManager As Object = CreateObject("com.sun.star.ServiceManager")
Dim objDesktop As Object = objManager.CreateInstance("com.sun.star.frame.Desktop")
Dim objDummy() As Object
Dim objDocument As Object = objDesktop.LoadComponentFromUrl("c:\temp\test.sxw", "_blank", 0, objDummy)
What's wrong ? objDummy declaration ? I've tried Dim objDummy(-1) as object, Erase objDummy... Please Help me.
Thanks
Loic |
|
| Back to top |
|
 |
LoIc Newbie

Joined: 11 Apr 2004 Posts: 3
|
Posted: Sun Apr 11, 2004 3:08 am Post subject: |
|
|
Here is the response :
Dim objDesktop As Object = objManager.CreateInstance("com.sun.star.frame.Desktop")
Dim objDummy(-1)
Dim objDocument As Object = objDesktop.LoadComponentFromUrl("file:///c:/temp/test.sxw", "_blank", 0, objDummy)
Be careful to the 3 / : not 2 not 4, or you've got Type mismatch error |
|
| Back to top |
|
 |
erikanderson3 OOo Advocate

Joined: 25 Feb 2004 Posts: 332 Location: San Francisco peninsula
|
Posted: Sun Apr 11, 2004 6:12 pm Post subject: |
|
|
| LoIc wrote: | | Be careful to the 3 / : not 2 not 4, or you've got Type mismatch error |
Other than an odd Monty Python reference, what does this mean?
Cheers,
Erik
"And the number of the counting shall be three..." |
|
| Back to top |
|
 |
LoIc Newbie

Joined: 11 Apr 2004 Posts: 3
|
Posted: Mon Apr 12, 2004 1:08 am Post subject: |
|
|
| In "file:///c:/temp/test.sxw" there's 3 / after file: |
|
| Back to top |
|
 |
|