Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Take advantage of Intellisense - VFP7 and VFP8 1

Status
Not open for further replies.

ramani

Programmer
Mar 15, 2001
4,336
AE
In the command window, if you type
oWord=CREATEOBJECT(&quot;word.application&quot;) <ENTER>
The moment you type oWord. intellisense kicks in and provides the available choices for the object created o.

But, when you are in code editor or in a PRG editing window, the same does not happen.
oWord =CREATEOBJECT(&quot;word.application&quot;)
oWord. nothing happens..

However, if you want the same advantage as in code editor... then.. follow the simple trick..

LOCAL oWord AS &quot;word.application&quot;
oWord=CREATEOBJECT(&quot;word.application&quot;)
oWord. The intellisense starts helping you.

:)

ramani :)
(Subramanian.G)
 
Ramani

One word to add to this, is even though intellisense kicks in, in a program (or a funtion) after the first line , the instance of Word or Excel is not actually created, so in order to code for automation you would still need to use
Code:
LOCAL oWord AS word.application && No quotation marks required
oWord=CREATEOBJECT(&quot;word.application&quot;) && You still need this line, for automation to work
oWord. The intellisense starts helping you.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Yes you are right. Mike.. oWOrd=CREATEOBJECT(&quot;...&quot;) is required... and I have that line in my sample code. Your explanation clears any doubt one may get.

However, to explain more precisely ..
LOCAL oWord AS &quot;word.application&quot; with or without quotation will work. And without quotes, it saves that much effort. :)

ramani :)
(Subramanian.G)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top