![]() |
paper size by name
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 |
paper size by name
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 |
paper size by name
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 |
paper size by name
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 |
paper size by name
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 |
paper size by name
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 |
paper size by name
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 |
All times are GMT +1. The time now is 05:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com