Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Orthografic corrector
Message
De
20/01/2010 05:56:30
 
 
À
20/01/2010 05:49:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01444897
Message ID:
01444901
Vues:
58
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform