Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unable to replace Comment TEXT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Oracle
Divers
Thread ID:
01330700
Message ID:
01330713
Vues:
16
This message has been marked as a message which has helped to the initial question of the thread.
>I'm using VFP-9 sp2 with Word 2003 for automation. I have a collection of comments in my document.
>
>In one of the comment, I have text follow by a table. I want to overwrite the entire content of the comment.
>- I tried the FIND method with a empty replacement text
>torange.Find.Execute(toRange.Text,,,,,,,,,[])
>
>- I tried the FIND method with a replacment text
>torange.Find.Execute(toRange.Text,,,,,,,,,lcCodelist+lcEND)
>
>- I tried the FIND method with a replacment text
>toRange.Text = lcCodelist
>
>I always get the following:
>Microsoft Word: Word can't delete a comment in the comment pane. Instead, delete the comment marker from the main document window...
>
>I think because there is a table in that comment, it won't replace it...
>
>Any idea??? anybody

Hi,

You coud try something like:
for each oComment in oWord.Activedocument.comments
  if oComment.Range.TAbles.count >0
     for each oTable in oComment.Range.TAbles
        for each ocell in oTable.Range.cells
              *replace text
        endfor
      endfor

   endif
endfor
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform