Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Word File
Message
De
29/05/2002 09:23:06
 
 
À
28/05/2002 17:10:59
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00661714
Message ID:
00662395
Vues:
23
This message has been marked as a message which has helped to the initial question of the thread.
>It seemed a logical way of doing it. Here's what I basically did. Does this seem like a good approach to you?

I don't ever use the Selection. I use Range objects instead because they're more flexible and faster.

So, for example, if the following is meant to add a bookmark at the end of the document, my version follows:
>
>WITH loWord
>         WITH .selection
>		.endkey(wdStory)
>		.insertparagraphafter()	
>	ENDWITH
>		.activedocument.bookmarks.add('intro')


   loDoc = loWord.ActiveDocument
   loRange = loDoc.Range()
   loRange.Collapse( wdCollapseEnd )
   loDoc.Bookmarks.Add( "intro", loRange )
For this section, you can work directly with the bookmark. You don't have to select it.

I'd replace this:
>WITH loWord.activeDocument
>	.bookmarks('table').select
>		WITH .application.selection
>                      && do .insertafter stuff here
>                      && and get out of table
>		ENDWITH 	
>
with this:
WITH loDoc.Bookmarks('table').Range()
   * do your stuff
ENDWITH
Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform