Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation question (MS Word from VFP)
Message
De
11/08/2006 16:22:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01144904
Message ID:
01144931
Vues:
17
>How would I position the cursor one line below the last record of the first MS Word table? I've tried using the value of nCounter (from above) once the first MS Word table has been created, but no matter what I do, the second MS Word table always ends up being created in Cell 1,1 of the first MS Word table.

First, eliminate the oRange.Select() from your code. It buys you nothing and just takes unnecessary time.

To solve your problem, use the Collapse method:

oRange.Collapse(0)

This reduces the Range to its endpoint. Then you can add a return and collapse it again. In general, when you're manipulating a range, the Collapse method is very useful.

All that said, I don't remember for sure whether collapsing a range that contains a table gets you out of the table. If necessary, add a return before you add the first table, then collapse the range to its start point (by passing 1 rather than 0) and add the first table. That ensures that you have something to grab after the table.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform