I need to create labels in word xp using script only.

what I have so far.

set objLbls = create object("word.application")
objLbls.visible=true

in between these 2 lines I need to populate the label fields and set
the type of avery sheet as well.

is that even possible, if so is there a knowledge base for it?
else please someone provide a sample code.
thanks

Re: scripting word by y

y
Sat Sep 11 20:32:01 CDT 2004

"Cam" <Cam@discussions.microsoft.com> wrote in message news:C37BC0E9-6736-4169-91D2-E7EFBE9ABE8A@microsoft.com...
> I need to create labels in word xp using script only.
>
> what I have so far.
>
> set objLbls = create object("word.application")
> objLbls.visible=true
>
> in between these 2 lines I need to populate the label fields and set
> the type of avery sheet as well.
>
I suppose you can get label name from Label Insert Wizard.
I use Japnese Version Word, so "J8560" may not in your Word.
You can study Property MailingLabel and Method CreateNewDocument
in Word Help.
Y Sakuda from Japan

Set WD = CreateObject("Word.Application")
Set wDoc = WD.Documents.Add
WD.MailingLabel.CreateNewDocument "J8560"
wDoc.Close
WD.Visible = True