VB.NET : Show print dialog before printing Word object

R

rija

Hi all,

I would like to know how can I do to display print dialog so that the
user can choose printer when printing word document object.

Basically, I download rtf document on the HD and open it with VB.NET
then use printout method to print it.

Now, what I want to do is to make the print dialog available.

Thanks in advance
 
J

J-Rod

This is an example of both the OpenFileDialog() and the PrintDialog,
You first choose a file, and then choose the printer.


Dim ofd As New OpenFileDialog()
If ofd.ShowDialog(Me) Then
' Allow the user to select a printer.
Dim pd As New PrintDialog()
pd.PrinterSettings = New PrinterSettings()
If (pd.ShowDialog() = Forms.DialogResult.OK) Then
' Print the file to the printer.
End If
End If
 

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