![]() |
custom paper size
Hi there,
I would like to know how to set up PaperSize. Let's say I have a custom paper designed for barcode label printing and the dimension is 1.25" X 1". I can set this up manually from Excel by going to File/ Page Setup and selecing from the dropdown list, which has 1.25" X 1". I have a VB.net application that creates excel worksheet on the fly. so far this is what i have objSheet.PageSetup.PaperSize = Excel.XlPaperSize.------(something) but there is no 1.25" x 1" paper size in the value list. any help will be appreciated. thanks |
custom paper size
I believe you would have to use xlPaperUser
then you would have to set the custom size using the windows API (same as setting it in the print driver manually) -- Regards, Tom Ogilvy Mike Kim wrote in message ... Hi there, I would like to know how to set up PaperSize. Let's say I have a custom paper designed for barcode label printing and the dimension is 1.25" X 1". I can set this up manually from Excel by going to File/ Page Setup and selecing from the dropdown list, which has 1.25" X 1". I have a VB.net application that creates excel worksheet on the fly. so far this is what i have objSheet.PageSetup.PaperSize = Excel.XlPaperSize.------(something) but there is no 1.25" x 1" paper size in the value list. any help will be appreciated. thanks |
custom paper size
thanks tom.
i tried to use xlPaperUser but gave up after fiddling it for a while. I could not find any documentation pertaining to this issue. if you know how to use windows api to accomplish this, can you post some sample codes. i would appreciate it. "Tom Ogilvy" wrote in message ... I believe you would have to use xlPaperUser then you would have to set the custom size using the windows API (same as setting it in the print driver manually) -- Regards, Tom Ogilvy Mike Kim wrote in message ... Hi there, I would like to know how to set up PaperSize. Let's say I have a custom paper designed for barcode label printing and the dimension is 1.25" X 1". I can set this up manually from Excel by going to File/ Page Setup and selecing from the dropdown list, which has 1.25" X 1". I have a VB.net application that creates excel worksheet on the fly. so far this is what i have objSheet.PageSetup.PaperSize = Excel.XlPaperSize.------(something) but there is no 1.25" x 1" paper size in the value list. any help will be appreciated. thanks |
custom paper size
Mike,
Manipulating the printer settings from the registry is rather complicated. It depends on operating system etc etc. A while back i've written an experimental addin MultiTrayPrint to switch printertrays. Although unused in the interface a lot of background stuff (like papersizes, bin to size mapping, etc etc) has been programmed into classmodules in the addin, and you may be able to use / adapt it to suit your needs. The code is NOT documented.. but fairly structered. It involves some 15 API functions and may be instructive. Download it from my site and have a look. http://members.chello.nl/keepitcool/download.html Any comments appreciated! keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Mike Kim" wrote: thanks tom. i tried to use xlPaperUser but gave up after fiddling it for a while. I could not find any documentation pertaining to this issue. if you know how to use windows api to accomplish this, can you post some sample codes. i would appreciate it. "Tom Ogilvy" wrote in message ... I believe you would have to use xlPaperUser then you would have to set the custom size using the windows API (same as setting it in the print driver manually) -- Regards, Tom Ogilvy Mike Kim wrote in message ... Hi there, I would like to know how to set up PaperSize. Let's say I have a custom paper designed for barcode label printing and the dimension is 1.25" X 1". I can set this up manually from Excel by going to File/ Page Setup and selecing from the dropdown list, which has 1.25" X 1". I have a VB.net application that creates excel worksheet on the fly. so far this is what i have objSheet.PageSetup.PaperSize = Excel.XlPaperSize.------(something) but there is no 1.25" x 1" paper size in the value list. any help will be appreciated. thanks |
All times are GMT +1. The time now is 08:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com