Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sat Aug 23, 2014 9:45 pm

Hi

Please can you give me the VB.Net code to load, show print dialogue and print a word document saved in Byte Array?

Regards
SSP

ssponnada
 
Posts: 8
Joined: Wed Jul 17, 2013 3:14 pm

Mon Aug 25, 2014 4:04 am

Dear ssponnada ,

Thanks for your inquiry.

For your requirement, please refer to the following code:
Code: Select all
Dim doc As New Document()
Dim array As Byte() = File.ReadAllBytes("Starbound.doc")
Using ms As New MemoryStream(array)
    doc.LoadFromStream(ms, FileFormat.Doc)
    PrintDialog1.AllowSomePages = True
    PrintDialog1.ShowHelp = True
    doc.PrintDialog = PrintDialog1
    PrintDialog1.Document = doc.PrintDocument
    If DialogResult.OK = PrintDialog1.ShowDialog() Then
        doc.PrintDocument.Print()
    End If
End Using

Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue support team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Mon Aug 25, 2014 11:42 am

Perfect. Thank you very much..

ssponnada
 
Posts: 8
Joined: Wed Jul 17, 2013 3:14 pm

Tue Aug 26, 2014 1:24 am

Dear ssponnada ,

Thanks for your feedback.

Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue support team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.Doc