[dba-Tech] Word index

Stuart McLachlan stuart at lexacorp.com.pg
Tue Feb 13 21:31:30 CST 2007


wdFieldTOCEntry.

To get a full list of field constants:
In Word  hit Alt+F11 (or Tools-Macro-Visual Basic Editor)
Then F2 (or View-Object Browser)
In the Classes list, go to WdFieldType and you will see all of the 
constants enumerated.

-- 
Stuart

On 13 Feb 2007 at 21:56, Susan Harkins wrote:

> Oh man, you're good -- that was fantastic! Do you have a constant for table
> of content entries?
> 
> I'll see if I can get this published -- interested? 
> 
> Susan H. 
> 
> -----Original Message-----
> From: dba-tech-bounces at databaseadvisors.com
> [mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell
> Sent: Tuesday, February 13, 2007 9:38 PM
> To: Discussion of Hardware and Software issues
> Subject: Re: [dba-Tech] Word index
> 
> On 2/13/07, Susan Harkins <ssharkins at setel.com> wrote:
> > How do I remove all the index field codes from a document? I can't submit
> a
> > manuscript with all these codes. Surely, I don't have to delete each one
> > individually?
> 
> Nope. here is some code to run:
> 
> Sub DeleteIndexEntries()
> 
> Dim doc As Document
> Dim fld As Field
> 
> Set doc = ActiveDocument
> 
> For Each fld In doc.Fields
>   fld.Select
>   If fld.Type = wdFieldIndexEntry Then
>     fld.Delete
>   End If
> Next
> 
> Set fld = Nothing
> Set doc = Nothing
> 
> End Sub
> 
> Just copy and paste into a module in the doc and run.
> 
> -- 
> Bryan Carbonnell - carbonnb at gmail.com
> Life's journey is not to arrive at the grave safely in a well
> preserved body, but rather to skid in sideways, totally worn out,
> shouting "What a great ride!"
> _______________________________________________
> dba-Tech mailing list
> dba-Tech at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-tech
> Website: http://www.databaseadvisors.com
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.441 / Virus Database: 268.17.35/680 - Release Date: 2/10/2007
> 9:15 PM
>  
> 
> _______________________________________________
> dba-Tech mailing list
> dba-Tech at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-tech
> Website: http://www.databaseadvisors.com





More information about the dba-Tech mailing list