Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE -- WHAT AM I DOING WRONG??
Message
From
17/03/1998 20:35:04
 
 
To
16/03/1998 23:37:06
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00084951
Message ID:
00085237
Views:
24
>hello what is wrong with the following code:
>
>code starts here
>
>* use filename && calls for a database
>set textmerge on
>set textmerge delimiters to
>i=1
>go 1
>do while i<=999999
>@ 10,10 say " Processing rec # -->"+str(i)
>set textmerge to D:PCLTEST.PRT noshow additive
>TEXT
><>
>6200 South Syracuse Street, Suite 150
>Englewood, CO 80111
>
>TEL: (303) 221-2000 FAX: (303) 221-3000
>
>ENDTEXT
>set textmerge to && closes the text file open
> && thru TEXTMERGE
>** OLE is here ************************
>oWorg=createobject("word.basic")
>if i<=1 && loops thru main file, first instance of word
>WITH oWorg && opens an instance of Word97
>.fileopen("d:\pcltest\test1.doc") && file created and to be used as an "overlay"
>.FILEPRINT(1,1,0,"d:\pcltest\pcltest.prt",,,,,,,,1,,)
>endwith && assuming Word97 and a HP 5si laser
>endif
>if i>1 && <--- error line here
>WITH oWorg
>.fileopen("d:\pcltest\test1.doc") && file created and to be used as an "overlay"
>.FILEPRINT(1,1,0,"d:\pcltest\pcltest.prt",,,,,,,,1,,)
>endwith
>endif
>
>IF EOF()
>SKIP -1
>I=99999999
>ELSE
>skip
>i=i+1
>ENDIF
>enddo
>
>set textmerge to
>
>*************
>RELEASE ALL
>************

Quite Strange!? The variable i become released?!
okey, try to use 'ELSE' instead of 'endif + if i>1'
!_!'

In C, I also meet some unexpect error on variable value after call
shell command!! So, I need to reInitize the variable before use again!
>_<"
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform