Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

Minimize Word to the tray

$
0
0
I print a Word document but the document shuts after print but Word stays open en maximized.

Is it possible to minimize Word to tray ?


Print with this code.

Code:

Try
            Dim pr As New Process
            Dim psi As New ProcessStartInfo
            With psi
                .FileName = Application.StartupPath.ToString + "\Home.doc"
                .Verb = "Print"
                .CreateNoWindow = False
                .WindowStyle = ProcessWindowStyle.Hidden

            End With

            With pr
                .StartInfo = psi
                .Start()

                .WaitForInputIdle()
                .Close()
            End With
        Catch ex As Exception


        End Try


Viewing all articles
Browse latest Browse all 27514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>