Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP & Word Automation Commands
Message
De
26/03/2003 15:09:37
 
 
À
26/03/2003 12:12:25
Dick Day
Madison County, Nebraska
Nebraska, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00757384
Message ID:
00770415
Vues:
18
Hi Dick.

1. The wd97cons.h file does not contain the wdMoveUp constant, it only has
>wdMove. How would I see what the value should be (I'm using Word2000) for this so I can add it to the .h file?


In VFP version 7 and later you can open up the Word type library in the object browser. You can then drag and drop enum nodes into your .h file to create teh #DEFINE statements.

This is what I see under the wdUnits enum in the Object browser:
#DEFINE wdCharacter	1	
#DEFINE wdWord	2	
#DEFINE wdSentence	3	
#DEFINE wdParagraph	4	
#DEFINE wdLine	5	
#DEFINE wdStory	6	
#DEFINE wdScreen	7	
#DEFINE wdSection	8	
#DEFINE wdColumn	9	
#DEFINE wdRow	10	
#DEFINE wdWindow	11	
#DEFINE wdCell	12	
#DEFINE wdCharacterFormatting	13	
#DEFINE wdParagraphFormatting	14	
#DEFINE wdTable	15	
#DEFINE wdItem	16	
Alternatively, if you just want all the constants (probably not a doos idea because there are a TON of them), you can go to Rick Strahl's web site and download his GetConstants program that automagically reads the type library and creates the .h file. It can be found at http://www.west-wind.com/webtools.asp

Selection.MoveUp Unit:=wdLine, Count:=1

My best guess (untested) would be this:
oWord.Selection.MoveUp( 5, 1 )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform