|
-
Apr 6th, 2006, 07:31 AM
#1
Thread Starter
Lively Member
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?
Last edited by lvermeersch; Apr 6th, 2006 at 09:01 AM.
-
Apr 24th, 2006, 02:40 PM
#2
Thread Starter
Lively Member
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.
-
Apr 24th, 2006, 03:07 PM
#3
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|