Label layout settings with word automation
I am using word automation (WordXp) with my VB6 App.
I want to change the label settings like width, height, number across, number down, Top margin, Side margin, Vertical en horizontal pitch
These settings are available in word in window 'Label options', which is a subwindow from window 'Envelopes and Labels'
Now i want to change these settings programmaticly in vb
like
Appword.ActiveDocument.....
Where can i find this and all settings concerning labels are welcome
Added info:
In he meanwhile i allready found several options.
Now i still need following
I can get the custom labelnames but not the once in Word itself
The custom once i get:
AppWord.mailingLabel.Customlabels(i).Name
When put in a loop i get all the labelnames and put them in a combobox.
But Where are the wordlabelnames like AE (2x4) Address.... from the Label options window?
Re: Label layout settings with word automation
Still looking for a way in VBA in Word how to get all the label produktnrs
Ther are listed in window 'Labels and envelopes'. I can only get the 2 custom labels i have made myself but not the once listed in de listbox.
Re: Label layout settings with word automation
Here is how you can access a labels properties.
VB Code:
Application.MailingLabel.CustomLabels.Add "TestLabel", False
Application.MailingLabel.CustomLabels.Item("TestLabel").Height = InchesToPoints(1)
Application.MailingLabel.CustomLabels.Item("TestLabel").Width = InchesToPoints(3)
Application.MailingLabel.CustomLabels.Item("TestLabel").SideMargin = InchesToPoints(0.5)
Application.MailingLabel.CustomLabels.Item("TestLabel").TopMargin = InchesToPoints(0.5)
Application.MailingLabel.CustomLabels.Item("TestLabel").PageSize = wdCustomLabelLetter