Word object and its Enumerations
I need to store various printer settings into the database (this would be done by the user thru “Maintain Printers” screen).1.In what format I’ve to store the printer information (paper source, papersize …)?2.Then how do I apply the stored values to word object. (It’ll accept only its enumerations)?
Hi JmchilhinneyThanks for the quick reply !
But, I have some more doubts regarding this , can we have a chat now in MSDN or yahoo or MSN. Which ever is suitable for you? After that I’ll sum up our conversation and post that into the forum. pls mail me your mail Id or reply here if MSDN chat is ok for you. You can see my email Id in my profile.
Ok...Can you elaborate your answer?
See, for one type of printer I may get the Paper source as “Tray 1”, “Tray 2” and for another type of printer I may get it as “Upper Tray”, “Lowe Tray” as strings….so, how do I map these with the correct word object enumeration? Say word will have “wdUpperTray”, “wdLoweTray” etc.
As its enums.
You can find the names and values of the members of any Word enumeration using the Object Browser and Immediate Window in the Word VBA IDE. Here are the members of the Word 2003 WdPaperTray enumeration and their values, copied and pasted from the Immediate Window. Just declare constants with these values for use in your C# code. ? wdPrinterAutomaticSheetFeed 7 ? wdPrinterDefaultBin 0 ? wdPrinterEnvelopeFeed 5 ? wdPrinterFormSource 15 ? wdPrinterLargeCapacityBin 11 ? wdPrinterLargeFormatBin 10 ? wdPrinterLowerBin 2 ? wdPrinterManualEnvelopeFeed 6 ? wdPrinterManualFeed 4 ? wdPrinterMiddleBin 3 ? wdPrinterOnlyBin 1 ? wdPrinterPaperCassette 14 ? wdPrinterSmallFormatBin 9 ? wdPrinterTractorFeed 8 ? wdPrinterUpperBin 1 -- Brendan Reynolds (Access MVP)
wrote in message news:c5b08797-be18-47ec-8e41-e480fb72f1f2@discussions.microsoft.com...
> Ok... >
> Can you elaborate your answer? > > >
> See, for one type of printer I may get the Paper source as "Tray 1",
> "Tray 2" and for another type of printer I may get it as "Upper Tray",
> "Lowe Tray" as strings..so, how do I map these with the correct word
> object enumeration? Say word will have "wdUpperTray", "wdLoweTray" etc. >
> As its enums. >
>