Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing object TO VFP
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00407763
Message ID:
00407794
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform