Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation question (MS Word from VFP)
Message
 
À
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:
01144938
Vues:
15
Thanks, Tamar, I appreciate the information.

I tried Collapse earlier, but as I recall it didn't get me out of the table. Good idea about adding a return in advance of adding the table, so I'll try that. Although I'm not sure I've done anything with adding returns in the past (I'll look for some syntax examples or record a macro to see what the VBA code for that looks like.)

BTW, The book you and Della put together (MS Office Automation with VFP) has been a tremendous help over the years! Unfortunately I don't work very often with automation, so I have to "relearn" everything each time something comes up. I've got a ton of highlights and paperclips in my tattered copy of it and I couldn't have made it without it, so thanks for all you do (and have done)!

Thanks again

>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform