Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My Word/VBA problem
Message
De
05/01/2001 10:50:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00459701
Message ID:
00459821
Vues:
27
Hi Della, tnx for caring to help me with Word/VBA - it's one of my bad dreams to work with..

I have solved most of my problem by the good old hard work, try and try again,
but a slight problem remains. What I am doing:

A mail merge creates my main document. Then, I want to insert a number of lines immediately following the present text. I now realize that I actually open the document, seems I must have saved if first. Guess that doesn't matter.
This is the relevant code:

# Define wdLine 5
with oWord
.Documents.Open(myDoc)
.Visible = .t.
.Application.Activate
.Selection.MoveDown(wdLine,5)
.selection.TypeText(subs(mystring,1, 90))
endwith

Now, what remains is to perform the same operation, but without making the document window visible.

Remove the .Visible = .t. statement, and I get error: Member SELECTION does not evaluate to an object

Remove the .Activate statement too, and the program works – but the text is inserted at the top instead of at bottom of the document.


The reason I don't leet merge do the whole job is that it seems word2000
messes up mamo fields, by permitting only 256 characters. I therefore break the memo up in a loop which does not show here.

Regards, Rolf
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform