Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paper size in Excell 2007 e28plug Excel Discussion (Misc queries) 1 July 28th 08 02:19 AM
print problem custom paper size Henry Excel Discussion (Misc queries) 0 February 27th 06 08:26 PM
custom paper size setting Boyd New Users to Excel 4 August 26th 05 06:14 AM
Is there a way to set up a custom paper size? rkstorey Excel Discussion (Misc queries) 3 February 3rd 05 02:07 AM
How do you set a custom paper size in Excel? Bambi41 Excel Discussion (Misc queries) 1 January 25th 05 02:57 AM


All times are GMT +1. The time now is 02:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"