Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update word bookmarks change alignment
Message
 
À
19/07/2009 07:22:28
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Application:
Desktop
Divers
Thread ID:
01413243
Message ID:
01413382
Vues:
35
>Hi
>Help please,
>
>I have word documents - few paragraph with different alignments.
>
>I want to update some bookmarks and vfp change the alignment as following:
>oword = createobject("word.application")
>with oword
>	.visible=.t.
>	oword.documents.open( "c:\wt\aa.doc") 
>	oword.activedocument.saveas("newdoc")
>	oword.activedocument.bookmarks("mydocdate").select
>	.selection.text=dtoc(date()+25)&&Opss..........code change the alignment frrom left to right
>	oword.activedocument.bookmarks("mtxtsum").select
>	.selection.text="My new text5"
>endwith
I believe that the behavior depends on the exact text in the bookmark. You may not see it, but the text can include invisible pieces like spaces tabs, etc, and then with replacing the text they all gone. Thus the text appearance changes.
If you wish, send to me your file to investigate.

Good Luck
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform