Create a pdf with each page being just 4 rows and 1 column wide

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,210
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
I hope someone can help me i'm totally stuck,
I'm trying to create a macro that will save as pdf the following data,
Active sheet Range A1:A and last row.

now I'd like each page to be just 4 rows,
So page one is A1:A4 etc.
The page size I'm working with is 2.25inch wide x 1.25inch height, so if we could make each pdf page that size it would be fantastic, if not if we could just make each page landscape and so the data fill the entire page that also would work.
basically I'm trying to print labels each label has 4 lines, one line is a barcode and my labels are 2.25inch wide x 1.25inch height
please help if you can, this will be used on a mac and windows 11 with latest version of excel

Thanks

Tony
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I have printed labels where there are lots of labels on one standard 8.5x11 sheet. Are you saying that this is a special label printer where each label is on a separate sheet?

I suggest you set up the page size for the sheet manually to that size. However, I don't think you can set it to 2.25 x 1.25. It depends on your PDF driver.

I would set up my page with a page break every four lines. I suppose you could do that as a one-time setup with VBA. How many labels will you have?

Then your macro will just export the sheet as-is to PDF. Not sure the advantage of using a macro for this when it's just a couple of clicks, unless you have other stuff that your macro is doing also.
 
Upvote 0
Solution
I have printed labels where there are lots of labels on one standard 8.5x11 sheet. Are you saying that this is a special label printer where each label is on a separate sheet?

I suggest you set up the page size for the sheet manually to that size. However, I don't think you can set it to 2.25 x 1.25. It depends on your PDF driver.

I would set up my page with a page break every four lines. I suppose you could do that as a one-time setup with VBA. How many labels will you have?

Then your macro will just export the sheet as-is to PDF. Not sure the advantage of using a macro for this when it's just a couple of clicks, unless you have other stuff that your macro is doing also.
Hi Jeff, thanks for the reply, I was inspired by your idea so wrote a macro to create a page break every 4 rows then adjusted the paper size and zoom to 250% so it fits the page, I then save to PDF and it saves each page as its own label and the printer adjust the pdf sheet to fit the label size, never have thought of that without your sideways idea, thanks Tony
 
Upvote 0

Forum statistics

Threads
1,223,176
Messages
6,170,542
Members
452,336
Latest member
boekl007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top