Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
When I use custom paper size, first I define it for the printer by submitting its name and page lenght and width. Windows assigns to it a code number, and when I record a macro printing on this paper size, the macro contains this code number, like ..PaperSize = 125 It's hard to remember to code numbers. Is there any way in VBA to refer to a custom paper size by its name? Thanks, Stefi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 6, 9:32 am, Stefi wrote:
Hi All, When I use custom paper size, first I define it for the printer by submitting its name and page lenght and width. Windows assigns to it a code number, and when I record a macro printing on this paper size, the macro contains this code number, like .PaperSize = 125 It's hard to remember to code numbers. Is there any way in VBA to refer to a custom paper size by its name? Thanks, Stefi Stefi, Search the VBE Help for PaperSize, click the PaperSize Property, and then when the help box opens, click the blue link labeled "XlPaperSize". Matt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Matt,
Thanks for your reply, I followed the link you suggested, and found names for pre-defined paper sizes, and one for user defined size: xlPaperUser, but there is no help on how to assign a value to this name, and how can I handle more than one custom paper sizes. Can you give me some more assistance? Regards, Stefi €ť ezt Ă*rta: On Jul 6, 9:32 am, Stefi wrote: Hi All, When I use custom paper size, first I define it for the printer by submitting its name and page lenght and width. Windows assigns to it a code number, and when I record a macro printing on this paper size, the macro contains this code number, like .PaperSize = 125 It's hard to remember to code numbers. Is there any way in VBA to refer to a custom paper size by its name? Thanks, Stefi Stefi, Search the VBE Help for PaperSize, click the PaperSize Property, and then when the help box opens, click the blue link labeled "XlPaperSize". Matt |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How are you setting the new custom paper size ?
NickHK "Stefi" wrote in message ... Hi Matt, Thanks for your reply, I followed the link you suggested, and found names for pre-defined paper sizes, and one for user defined size: xlPaperUser, but there is no help on how to assign a value to this name, and how can I handle more than one custom paper sizes. Can you give me some more assistance? Regards, Stefi " ezt írta: On Jul 6, 9:32 am, Stefi wrote: Hi All, When I use custom paper size, first I define it for the printer by submitting its name and page lenght and width. Windows assigns to it a code number, and when I record a macro printing on this paper size, the macro contains this code number, like .PaperSize = 125 It's hard to remember to code numbers. Is there any way in VBA to refer to a custom paper size by its name? Thanks, Stefi Stefi, Search the VBE Help for PaperSize, click the PaperSize Property, and then when the help box opens, click the blue link labeled "XlPaperSize". Matt |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Via Windows Control Panel/Printers and Faxes/Printer Properties/General
tag/Printing settings/Paper-Quality tag/Custom Paper Size Sorry if some words don't match the originals, I'm tanslating them back from Hungarian. Stefi €žNickHK€ť ezt Ă*rta: How are you setting the new custom paper size ? NickHK "Stefi" wrote in message ... Hi Matt, Thanks for your reply, I followed the link you suggested, and found names for pre-defined paper sizes, and one for user defined size: xlPaperUser, but there is no help on how to assign a value to this name, and how can I handle more than one custom paper sizes. Can you give me some more assistance? Regards, Stefi " ezt Ă*rta: On Jul 6, 9:32 am, Stefi wrote: Hi All, When I use custom paper size, first I define it for the printer by submitting its name and page lenght and width. Windows assigns to it a code number, and when I record a macro printing on this paper size, the macro contains this code number, like .PaperSize = 125 It's hard to remember to code numbers. Is there any way in VBA to refer to a custom paper size by its name? Thanks, Stefi Stefi, Search the VBE Help for PaperSize, click the PaperSize Property, and then when the help box opens, click the blue link labeled "XlPaperSize". Matt |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It would seem that Custom paper info (Forms in Windows) is stored in the
Registry at: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Pr int\Forms I'm not sure how these relate to the numbers you set for .PaperSize though. e.g. For my Acrobat PDF printer, setting papersize to ARCH A ( a custom size presumably installed by this printer), gives a value of .PaperSize=125. As there seems no direct link in this area of the registry that I can see, you may have to resort to the API, specifically using the DEVMODE structure and get its dmFormName element. This shows you all you need for dealing with Printers: http://vb.mvps.org/samples/project.asp?id=PrnInfo NickHK "Stefi" wrote in message ... Via Windows Control Panel/Printers and Faxes/Printer Properties/General tag/Printing settings/Paper-Quality tag/Custom Paper Size Sorry if some words don't match the originals, I'm tanslating them back from Hungarian. Stefi "NickHK" ezt írta: How are you setting the new custom paper size ? NickHK "Stefi" wrote in message ... Hi Matt, Thanks for your reply, I followed the link you suggested, and found names for pre-defined paper sizes, and one for user defined size: xlPaperUser, but there is no help on how to assign a value to this name, and how can I handle more than one custom paper sizes. Can you give me some more assistance? Regards, Stefi " ezt írta: On Jul 6, 9:32 am, Stefi wrote: Hi All, When I use custom paper size, first I define it for the printer by submitting its name and page lenght and width. Windows assigns to it a code number, and when I record a macro printing on this paper size, the macro contains this code number, like .PaperSize = 125 It's hard to remember to code numbers. Is there any way in VBA to refer to a custom paper size by its name? Thanks, Stefi Stefi, Search the VBE Help for PaperSize, click the PaperSize Property, and then when the help box opens, click the blue link labeled "XlPaperSize". Matt |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That should be :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Print\Forms NickHK "NickHK" wrote in message ... It would seem that Custom paper info (Forms in Windows) is stored in the Registry at: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Pr int\Forms I'm not sure how these relate to the numbers you set for .PaperSize though. e.g. For my Acrobat PDF printer, setting papersize to ARCH A ( a custom size presumably installed by this printer), gives a value of .PaperSize=125. As there seems no direct link in this area of the registry that I can see, you may have to resort to the API, specifically using the DEVMODE structure and get its dmFormName element. This shows you all you need for dealing with Printers: http://vb.mvps.org/samples/project.asp?id=PrnInfo NickHK "Stefi" wrote in message ... Via Windows Control Panel/Printers and Faxes/Printer Properties/General tag/Printing settings/Paper-Quality tag/Custom Paper Size Sorry if some words don't match the originals, I'm tanslating them back from Hungarian. Stefi "NickHK" ezt írta: How are you setting the new custom paper size ? NickHK "Stefi" wrote in message ... Hi Matt, Thanks for your reply, I followed the link you suggested, and found names for pre-defined paper sizes, and one for user defined size: xlPaperUser, but there is no help on how to assign a value to this name, and how can I handle more than one custom paper sizes. Can you give me some more assistance? Regards, Stefi " ezt írta: On Jul 6, 9:32 am, Stefi wrote: Hi All, When I use custom paper size, first I define it for the printer by submitting its name and page lenght and width. Windows assigns to it a code number, and when I record a macro printing on this paper size, the macro contains this code number, like .PaperSize = 125 It's hard to remember to code numbers. Is there any way in VBA to refer to a custom paper size by its name? Thanks, Stefi Stefi, Search the VBE Help for PaperSize, click the PaperSize Property, and then when the help box opens, click the blue link labeled "XlPaperSize". Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I am trying to print on legal size paper, i cant set size. | Excel Discussion (Misc queries) | |||
paper size | Excel Discussion (Misc queries) | |||
how do I set paper size to 11x 17? | Excel Discussion (Misc queries) | |||
Paper size. | Excel Discussion (Misc queries) | |||
Paper size | Excel Discussion (Misc queries) |