|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
working with a com interfaceinterface to lotus wordpro in vb.net and after adding the reference to wordpro to my project I find that I get only the interface. e.g this approach works, where I create an object: Dim wpApp As Object wpApp = CreateObject("wordpro.application") but I lose all the advantages of the type definition But this alternative doesnt work: Dim wpapp As Wordpro.WPApplication gives me an error that Wordpro.WPApplication is an interface Dim i% = lstFiles.SelectedIndex Dim fn$ = lstFiles.Items(i) Try wpApp.OpenDocument(fn) wpApp.ActiveDocWindow.visible = True Catch ex As Exception MsgBox("Open failed on document " + fn + " for " + ex.Message) End Try You are only declaring a variable of <type>.
You need to instantiate it as well. Dim wpapp As New Wordpro.WPApplication === Show quoteHide quote "barcrofter" <jd.p***@gmail.com> wrote in message news:37f1fe94-85f6-44cf-ba6e-d9e0b90459f8@s12g2000prg.googlegroups.com... > Im having vb6 transitional problems. Im trying to build an automation > interface to lotus wordpro in vb.net and after adding the reference to > wordpro to my project I find that I get only the interface. > e.g this approach works, where I create an object: > > Dim wpApp As Object > wpApp = CreateObject("wordpro.application") > > but I lose all the advantages of the type definition > > But this alternative doesnt work: > > Dim wpapp As Wordpro.WPApplication > > > gives me an error that Wordpro.WPApplication is an interface > > Dim i% = lstFiles.SelectedIndex > Dim fn$ = lstFiles.Items(i) > Try > wpApp.OpenDocument(fn) > wpApp.ActiveDocWindow.visible = True > Catch ex As Exception > MsgBox("Open failed on document " + fn + " for " + > ex.Message) > End Try
Creating a Web Service (Service, not Client) from WSDL
Trouble with sendkey TAB Reurning Arrays Question about Application Layout Saving an image from a picturebox Editing an indexed PixelFormat Where are use scoped settings stored? Color Equality Determining the Default Printer Please vote for rendering bug (loss of AlphaChannel) for ico-files! |
|||||||||||||||||||||||