OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

LoadComponentFromUrl and VB.NET

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
LoIc
Newbie
Newbie


Joined: 11 Apr 2004
Posts: 3

PostPosted: Sun Apr 11, 2004 2:47 am    Post subject: LoadComponentFromUrl and VB.NET Reply with quote

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
View user's profile Send private message
LoIc
Newbie
Newbie


Joined: 11 Apr 2004
Posts: 3

PostPosted: Sun Apr 11, 2004 3:08 am    Post subject: Reply with quote

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
View user's profile Send private message
erikanderson3
OOo Advocate
OOo Advocate


Joined: 25 Feb 2004
Posts: 332
Location: San Francisco peninsula

PostPosted: Sun Apr 11, 2004 6:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
LoIc
Newbie
Newbie


Joined: 11 Apr 2004
Posts: 3

PostPosted: Mon Apr 12, 2004 1:08 am    Post subject: Reply with quote

In "file:///c:/temp/test.sxw" there's 3 / after file:
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group