-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center.
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center.
- HP Community
- Desktops
- Desktop Software and How To Questions
- is it possible to obtain the user name of a custom paper siz...
Create an account on the HP Community to personalize your profile and ask a question
03-26-2022 06:57 AM
I'm using Microsoft Excel VBA and would like to know if i can get the user name of the custom paper size. I can get the paper size enumerated number of the custom paper size, but it is not the same on different computers, the user name of the paper size is.
Solved! Go to Solution.
Accepted Solutions
03-27-2022 11:31 AM
You are welcome.
I've not taken the information farther than presented.
One thing I'd change from the previous example - change the output format to htable
wmic printer get PrinterPaperNames,DriverName /format:htable > C:\Users\Dragon\Documents\Printer_Paper_list_table.html
Just neater...
Observation: The data might be better extracted using PowerShell though I've not fully checked into this side of it.
I did - in a previous life - live fully immersed in this world. My skill level is mostly lost, ancient, and not useful to you.
The point is to illustrate that the information is available so you can move forward.
Good Luck.
Thank you for participating in the HP Community.
Our Community is comprised of volunteers - people who own and use HP devices.
Click Helpful = Yes to say Thanks!
Question / Concern Answered, Click "Accept as Solution"
03-26-2022 09:03 AM
Consider ...
Open a command prompt window with Admin privileges:
Windows key + X + A
Type the wmic command to gather the paper names of the printers in the system
wmic printer get PrinterPaperNames,DriverName
Example
wmic printer get PrinterPaperNames,DriverName /format:hform > C:\Users\Dragon\Documents\Printer_Paper_list.html
Excerpt > Partial Output (for OfficeJet Pro 9025)
PrinterPaperNames | {"Letter","Letter Small","Legal","Statement","Executive","A4","A4 Small","A5","B5 (JIS)","Folio","Quarto","Note","Envelope #9","Envelope #10","Envelope #11","Envelope #12","Envelope #14","Envelope DL","Envelope C5","Envelope C6","Envelope C65","Envelope B5","Envelope B6","Envelope","Envelope Monarch","6 3/4 Envelope","German Std Fanfold","German Legal Fanfold","Japanese Postcard","Reserved48","Reserved49","Letter Transverse","A4 Transverse","Letter Plus","A4 Plus","A5 Transverse","B5 (JIS) Transverse","A5 Extra","B5 (ISO) Extra","Japanese Double Postcard","A6","Japanese Envelope Kaku #3","Japanese Envelope Chou #3","Japanese Envelope Chou #4","A5 Rotated","Japanese Postcard Rotated","Double Japan Postcard Rotated","A6 Rotated","Japan Envelope Chou #4 Rotated","B6 (JIS)","B6 (JIS) Rotated","Japan Envelope You #4","PRC 16K","PRC 32K","PRC 32K(Big)","PRC Envelope #1","PRC Envelope #2","PRC Envelope #3","PRC Envelope #4","PRC Envelope #5","PRC Envelope #6","PRC Envelope #7","PRC Envelope #8","PRC 32K Rotated","PRC 32K(Big) Rotated","PRC Envelope #1 Rotated","PRC Envelope #2 Rotated","PRC Envelope #3 Rotated","PRC Envelope #4 Rotated","North America 5x 8","North America 4x 6","North America 5x 7","English Photo L","North America 8x 10","North America 3x 5"," 4 124803x9 5","2L 127x178mm","3.5x5in./L 89x127mm","3x5in.","4x5in./10x13cm","4x6in./10x15cm","4x12in./10x30cm","5x7in./13x18cm","8.5x13in.","8x10in.","Index card A4 8.27x11.69in.","B5 (ISO) 176x250mm","Envelope A2 111x146mm","Index card 3x5in.","Index card 4x6in.","Index card 5x8in.","Index card Letter 8.5x11in.","O**bleep**u hagaki","O**bleep**u hagaki 200x148mm","Letter Half Sheet","Envelope A9","6x4 Landscape","Custom Card 8x6-1/2","Envelope 10 Style"} . |
Check the results against settings
Control Panel > icon view > Devices and Printers
Right-Click Printer > Printing Preferences
Tab Paper / Quality
Section Paper Options
Paper Size > Custom
Displays paper size list
Thank you for participating in the HP Community.
Our Community is comprised of volunteers - people who own and use HP devices.
Click Helpful = Yes to say Thanks!
Question / Concern Answered, Click "Accept as Solution"
03-27-2022 09:48 AM
Thank you very much! This was very helpful, it amazes me all the tools available! What I'm trying to do is associate the value that is returned from the PageSetup object property PageSize to the name for the custom page size that I created. That value is different on every printer the computer has access to and different every computer that the printer is attached to. Is there a way to make that association? Thanks again for your help!!
03-27-2022 11:31 AM
You are welcome.
I've not taken the information farther than presented.
One thing I'd change from the previous example - change the output format to htable
wmic printer get PrinterPaperNames,DriverName /format:htable > C:\Users\Dragon\Documents\Printer_Paper_list_table.html
Just neater...
Observation: The data might be better extracted using PowerShell though I've not fully checked into this side of it.
I did - in a previous life - live fully immersed in this world. My skill level is mostly lost, ancient, and not useful to you.
The point is to illustrate that the information is available so you can move forward.
Good Luck.
Thank you for participating in the HP Community.
Our Community is comprised of volunteers - people who own and use HP devices.
Click Helpful = Yes to say Thanks!
Question / Concern Answered, Click "Accept as Solution"