Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Orthografic corrector
Message
From
20/01/2010 05:56:30
 
 
To
20/01/2010 05:49:06
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01444897
Message ID:
01444901
Views:
59
Sorry, that function of my uses another one (-> LoadWord) so here is that code, too ... ;-)
FUNCTION LoadWord
	LOCAL liVersion as Integer, lcMsg as String
	liVersion = 0
	IF !PEMSTATUS(_screen,[oWord],5)
		_screen.AddProperty([oWord])
	ENDIF
	TRY
		_screen.oWord = CREATEOBJECT([Word.Application])
	CATCH
		TEXT TO lcMsg TEXTMERGE NOSHOW PRETEXT 3
			It seems, there is no MS WORD installed on your system.
			This App is needed to continue with the functionallity 
			you just wanted to use.
		ENDTEXT
		MESSAGEBOX(lcMsg,0+64+0,[Info])
	ENDTRY
	IF VARTYPE(_screen.oWord) = [O]
		WITH _screen.oWord
			IF INLIST(ALLTRIM(.version), [9.0], [10.0], [11.0], [12.0])
				liVersion = INT(VAL(.Version)
			ELSE
				TEXT TO lcMsg TEXTMERGE NOSHOW PRETEXT 3
					Please install a hight Version of MS WORD (9+)
					Otherwise, this feature is not available.
				ENDTEXT
				MESSAGEBOX(lcMsg,0+64+0,[Info])
				.Quit()
			ENDIF
		ENDWITH
	ENDIF
	RETURN liVersion
ENDFUNC
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Reply
Map
View

Click here to load this message in the networking platform