Printer PaperSize returned as a String - How

D

Dennis Macdonald

I have an API that returns the papersize as a number but how do I get
the string version (ie 9 = "A4").

This is OK when the parpersize returned is one of the papersize
contants, I can map it, but when it is not, how do I get the string
version.

That is - in Excel it shows a pulldown of all the page sizes available
in text form - where can I get a similar list wityh an API.

I hope this makes sense.

Thanks,
Dennis.
 
R

Rich Locus

Dennis:

Your question is a little vague.... what API? One you wrote, part of
another system, a Microsoft Object? Regardless, can you find out every
number returned from the API? If so, have two arrays, one with the number
value and the other with the text version. So, if the API returns a number,
search the array for that number, and then use the corresponding text version
in the second array.

I may be way off base from your question, but if you refine it, perhaps I
could get closer to your answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top