Removing {tc "la-la-la"} prefixes from word document 
Author Message
 Removing {tc "la-la-la"} prefixes from word document

Hello,

I use some tool that generates rtf files with {tc "..."} prefixes for
marking table of contents elements. I preffer different table of contents,
so I use VBA routine to reformat document text.

Can anybody help me to write VBA procedure to remove this prefixes or get me
any ides to find information in Word VBA Help file.

Best wishes,
Mikhail Krivoshein



Fri, 21 Jan 2005 21:05:30 GMT  
 Removing {tc "la-la-la"} prefixes from word document
Hi Mikhail,

You can use the following to delete all fields that are TOCEntry fields and
look like { TC "...."}

Dim f As Field
For Each f In ActiveDocument.Fields
    If f.Type = wdFieldTOCEntry Then
        f.delete
    End If
Next f

HTH


Quote:
> Hello,

> I use some tool that generates rtf files with {tc "..."} prefixes for
> marking table of contents elements. I preffer different table of contents,
> so I use VBA routine to reformat document text.

> Can anybody help me to write VBA procedure to remove this prefixes or get
me
> any ides to find information in Word VBA Help file.

> Best wishes,
> Mikhail Krivoshein



Fri, 21 Jan 2005 21:22:40 GMT  
 Removing {tc "la-la-la"} prefixes from word document
Thanks, it's smart and works fine.


Fri, 21 Jan 2005 22:20:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Lets all do the Combo, la, la, la-la

2. SQL SERVER - ORACLE ... MERECE LA PENA LA INVERSIóN

3. Eviter la modification du curseur de la souris lors d'une requete

4. Serializing objects "a la Java"

5. Changing menu language in Word/ changer la langue des menus dans Word

6. api para conocer la version de Word Basic

7. Remove "FW" prefix in Forwarded messages

8. Problemas de coherencia con ADO (la mía ya la perdí!)

9. roulette de la souris

10. qualcuno utilizza la news in lingua italiana?

11. Freeware la nuova versione di FilterDb Light

12. Real-time or background running of a process, a la spell check

 

 
Powered by phpBB® Forum Software