Finding labels in Word

L

Lloy Sanders

I have a nice little script to find custom labels set up in Word.

Set objWord = CreateObject("Word.Application")
objWord.Documents.Add

For iCnt = 1 To objWord.MailingLabel.CustomLabels.Count
strLabel = objWord.MailingLabel.CustomLabels.Item(iCnt).Name
cboTemplates.Items.Add strLabel
Next
objWord.Quit
Set objWord = Nothing

Works great, but how do I find the built in labels (e.g. the Avery labels,
etc.)? Thanks
 
C

Cindy M.

Hi Lloy,
I have a nice little script to find custom labels set up in Word.

Set objWord = CreateObject("Word.Application")
objWord.Documents.Add

For iCnt = 1 To objWord.MailingLabel.CustomLabels.Count
strLabel = objWord.MailingLabel.CustomLabels.Item(iCnt).Name
cboTemplates.Items.Add strLabel
Next
objWord.Quit
Set objWord = Nothing

Works great, but how do I find the built in labels (e.g. the Avery labels,
etc.)?
This isn't exposed in the object model. Possibly because the labels all come
from third parties...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top