Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing object TO VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00407763
Message ID:
00407794
Vues:
25
A few things to try..

First, you can eliminate some code:


' Make sure you set a reference to your vfpotest.voserver classlib in
tools-references


' You can define it and create it in 1 step
Dim VFPOLE As New VFPOtest.VOServer
' Why use object. Let intellisense work for you...
' Also, by defining it as object, you may only be passing the DEFAULT PROPERTY
' The Default Property for a document is the name property - which is a string.

' Then again, why are you storing it to a variable. Why not just pass the
' active document to the VFP server????

' ALso, I am not sure about the parens.. YOu are not returning a value, so, you
' don't need them...

' I would try passign the activedocument itself.. It does work. I know,
' I have done it!! < bg >

Dim lobject As Document
'-- Assign object reference to variable
-Set lobject = ActiveDocument

-VFPOLE.Getinfo (lobject)
VFPOLE.Getinfo ActiveDocument
Set VFPOLE = Nothing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform