Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Wed, 3 Sep 2008 14:03:45 +0800,    group: microsoft.public.word.vba.userforms        back       


Can you populate a list box with cross-reference items?   
I want to populate a list box with all the numbered reference items in a 
document.  Does anyone know if this is possible?  Thank you

url:http://www.ureader.com/gp/1023-1.aspx
date: Wed, 3 Sep 2008 14:03:45 +0800   author:   amanda taylor

Re: Can you populate a list box with cross-reference items?   
Something like the following should do it:

Dim afield As Field
For Each afield In ActiveDocument.Fields
    If afield.Type = wdFieldRef Then
        ListBox1.AddItem afield.Result
    End If
Next afield


-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"amanda taylor"  wrote in message 
news:c8b92c51d3204998a4aab0f984faffec@newspe.com...
>I want to populate a list box with all the numbered reference items in a
> document.  Does anyone know if this is possible?  Thank you
>
> url:http://www.ureader.com/gp/1023-1.aspx
date: Fri, 5 Sep 2008 17:01:06 +1000   author:   Doug Robbins - Word MVP

Re:Can you populate a list box with cross-reference items?   
Thank you - works a treat.

url:http://www.ureader.com/msg/1023596.aspx
date: Mon, 8 Sep 2008 09:48:13 +0800   author:   amanda taylor

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us