View Single Post
  #3   Report Post  
Iceman_Aragorn
 
Posts: n/a
Default Print without seeing the print dialogue box first

I'm not printing from Word...but from a C# application.

"Suzanne S. Barnhill" wrote:

There are two print commands in Word: FilePrint, which brings up the dialog,
and FilePrintDefault, which prints the entire document using the current
settings.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Iceman_Aragorn" wrote in message
...
I currently have a C# application (a touchscreen app), and after

collecting
some data from the user and other sources, the user can press a button
labeled print, just a regular old button.
I have a print class set up such that it'll print the stuff in the

textboxes
to the printer, but when you press the button, it just brings up the print
dialogue box...you select the printer, and press ok.

The thing is, i want to skip that step, and just automatically print when
you press the big button on the form that i labeled print. I don't want

to
skip the whole windows API and use dos or something like that, I just want

to
print, and have the settings normally set by that print dialogue box to be
taken from, say, a little xml config file instead.

So what I need to figure out is, how do i make the print event not bring

up
the print dialogue first,
and second, what the properties are that i have to call to set the print
settings that would, in this case, be set up by a file rather than the
dialogue.

So to recap, I want to print the text in a bunch of textboxes on a form
directly to the printer by pressing a single windows form button.

Thanks