Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2010 Tell which label (Product Number) used in existing doc?

Status
Not open for further replies.

dcompto

Technical User
Jul 5, 2001
751
US
Do you know of a way to tell which labels product number was used for an existing Word 2010 doc?

I have a label document that was created by someone else and I'm wondering if there is an easy way to determine the product number (instead of applying borders to the labels, measuring the label size, then scrolling through the entire list of product numbers).

For newbies: Add the product number at the beginning of your filename so you will instantly know which labels to place in the printer.
 
hi,

Not that I know of.

Your table/label format could conform to any number of different vendor/product/label id.

The varaibles include the distanle from the top edge to the top of the table, the left edge to the left of the table, the height and width of each label, the horizontal distance between labels (if applicable) the vertical distance between labels (if applicable).

These dimenstions are specified for each label in Word.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
If you create labels with: Avery US Letter, 5162 Easy Peel, you end up with LabelID:="1359804673"
it looks like you would need a look-up table to know which labels go with what other 'stuff'. Could be a very loong table.

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Andy,

How did you determine LabelID:="1359804673" for Avery US Letter, 5162 Easy Peel?
 
Start Word 2010, record a macro: Mailings - Labels - (mine shows with the default Avery US Letter, 5162 Easy Peel, I guess the last one used) - labels tab - type anything in the label or kust click 'New Document'

Alt-F11 will get you to VBA Editor where you can see:

Code:
    Application.MailingLabel.CreateNewDocumentByID [blue]LabelID:="1359804673"[/blue], _
        Address:="Something", AutoText:="ToolsCreateLabels1", LaserTray:= _
        wdPrinterManualFeed, ExtractAddress:=False, PrintEPostageLabel:=False, _
        Vertical:=False

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
However, that does not help with an existing label already having been previously created.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 

...and it turns out that THAT LabelID has no apparent relationship with the Mfg Label Number???

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Here is some information about labels and IDs in Word 2007, but it may get you some ideas of where to go next...

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 


This may work...
Code:
    MsgBox Application.MailingLabel.DefaultLabelName


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 


Sorry, my last post is not correct. It appears to be the latest Label Nbr selected in the Envelopes & Labels > Labels > OPTIONS and NOT the label in any particular document.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Skip, you may be right.
I get a message box with "5162 Easy Peel Address Labels" when I run your code.
And when I change to some other label, I get: "5147 Print or Write Name Badge Labels"
Nice :)

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
It is as Skip last mentioned. To test, I created 2 files of different labels then ran the macro on each file. It returned the name of the label number last used and not the name of the label number used in the current document.
 

Yes. You can see by the code that it is the APPLICATION object property, rather than a DOCUMENT object property.

Sorry for the false hope. [blush]

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
I had thought one might be able to capture the required elements of the existing label layout's structure (LabelAcross , LabelDown, LabelTopMargin, LabelSideMargin, LabelVertPitch, LabelHorPitch, LabelHeight, LabelWidth - all used by Dialogs(wdDialogToolsEnvelopesAndLabels)), then use the dialogue to retrieve the Product ID, via code like:
Code:
With Dialogs(wdDialogToolsEnvelopesAndLabels)
  For i = 1 To 1000
    .LabelIndex = i
    .Update
    'Test here
  Next
End With
However, the incrementing the .LabelIndex doesn't seem to achieve anything, so you can't actually do the test unless you have the correct label selected... It doesn't seem to matter what you do with .LabelIndex, the current label selection in the dialogue never changes.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top