View Single Post
 
Old 08-17-2016, 05:52 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by LoftySuth View Post
Unfortunately I am having problems with your code because 1Col takes on the value of a 13 digit barcode (in the last column of the table).
In that case, edit the code as per the comments on this line:
LblCol = lCol ' If the label #s aren't in the last column, specify the column index # here
Quote:
Originally Posted by LoftySuth View Post
I can create code by recording a macro, but I cant find a way of triggering this code from Excel or even from within Word. If I manually open the Word document containing the code I get the message to confirm the data source but nothing further happens until I go through the merge manually.
Can you help me further? Ideally, I want to have my user open the excel Workbook
choose the bar code and the number of labels required(this I have successfuly coded), then move seamlessly from Excel into the Word document and complete the label printing.
The macro I've posted is designed to be run from Excel, so that part of the setup is already taken care of. To execute the merge from Excel, though, you need to automate Word. For code to do that, see the discussion in: https://www.msofficeforums.com/mail-...ail-excel.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote