Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print custom and current page?

I am following this Edraw Link.

I was able to search for one of my problem using this LINK.

My code now is

  With AxEDOffice1
     .PrintOut(EDOfficeLib.WdPrintOutRange.wdPrintRangeOfPages, 1, 1, "", 2)
           // from page , to page , (Page as Object) this one is don't know how to use, number of copies //
  End With

 //This one is for next page but its not working. I print preview first and click a button using code below.
 With AxEDOffice1
        .SlideGotoNext()
    End With

My question

  1. if I set the range of the page to be print can I Print Preview it?
  2. How to print current page? (I see this code .PrintOut(EDOfficeLib.WdPrintOutRange.wdPrintCurrentPage)) but the problem is how to navigate to next / previous pages.
  3. How to jump into a specific page?
like image 499
KiRa Avatar asked Jan 23 '17 03:01

KiRa


1 Answers

Edraw library is built using Microsoft.Office.Interop.Word Library so PrintOut Method is the same as found Here (MSDN article above is very useful to your case)

Side Note: To get more attention don't ask anymore about Edraw when things can be done when asking on Microsoft.Office.Interop.Word because it is used by a wide range of people And supported by microsoft.

  • Use AxEDOffice1.ActiveDocument.PrintOut Method

  • To specify Print range you have to select EDOfficeLib.WdPrintOutRange.wdPrintFromTo option and specify From and To parameter. (Begin page and end page)

These reference will help you also:

  • https://msdn.microsoft.com/en-us/library/b9f0ke7y.aspx
  • https://msdn.microsoft.com/en-us/library/b1x2ca5h.aspx
  • https://msdn.microsoft.com/en-us/library/microsoft.office.tools.word.document.goto.aspx

Hope i helps

like image 157
Hadi Avatar answered Oct 19 '22 15:10

Hadi