How to set printer properties using vb.net
<p>I am using <a href="https://www.edrawsoft.com/embed-word-vbnet.php" rel="nofollow noreferrer">EDRAW</a> to browse a Microsoft Word and can be <code>Print , Preview , ETC..</code>. And I am planning to add some features to it. I am adding 2 buttons for <code>Print Short (8.5 by 11 inches)</code> and <code>Print Long (8.5 by 13 inches)</code> and I have 2 printers for long and short. How to set the properties of the printers in  each button?. If I click button short it will print short using printer 1 same as the button long but it is in printer 2.</p>

<p>I am following the code in the Link provided above.</p>

<p>Anyone has an idea about it?. Any suggestion well help and well be accepted. Thanks.. Cheers.. I will give a 50 bounty to it after two days..</p>

<p><strong>Code as @Hadi request</strong></p>

<p>Here is my button code for print.</p>

<pre><code>Private Sub btnPrint_Click(sender As System.Object, e As System.EventArgs) Handles btnPrint.Click
    AxEDOffice1.SetActivePrinter("Printer Name")
    AxEDOffice1.ActiveDocument.PageSetup.PaperSize = Microsoft.Office.Interop.Word.WdPaperSize.wdPaperA4
    AxEDOffice1.PrintDialog()
End Sub
</code></pre>

<p>and getting an error <em>Object variable or With block variable not set</em> in the line code of <code>AxEDOffice1.ActiveDocument.PageSetup.PaperSize = Microsoft.Office.Interop.Word.WdPaperSize.wdPaperA4</code></p>