Neevia Technology Sites:   www.neevia.com  |  docuPub.com  |  www.neeviaPDF.com
:: Home :: Products :: Technical Support :: About Us :: Contact Us
Technical support > Neevia docuPrinter SDK code samples
Example 3: Convert a MS Word document into PDF (docuPrinter Word Macro) from VB.NET  Print Example 

Sub WordConverter()

   Dim docToConvert As String = "c:\test.doc"

   Dim DPSDK As Object = CreateObject("docuPrinter.SDK")

   DPSDK.DocumentOutputFormat = "PDF"
   DPSDK.DocumentOutputName = "demoDOC"
   DPSDK.DocumentOutputFolder = "c:\"

   DPSDK.HideSaveAsWindow = True
   DPSDK.DefaultAction = 1

   DPSDK.ApplySettings()

   Dim DPWORD As Object = CreateObject("docuPrinter.WordMacro")
   DPWORD.CHBookmarks = True
   DPWORD.CInternetLink = True
   DPWORD.CCrosRef = True
   DPWORD.CCrosDoc = True
   DPWORD.LinkFootEnd = True
   DPWORD.CWordTextBox = True
   DPWORD.CDocInfo = True
   DPWORD.CBookNameDest = True
   DPWORD.CComNotes = True
   Dim RVal As Integer = DPWORD.ConvertDocument( docToConvert )

   DPWORD = Nothing
   DPSDK = Nothing

   If (RVal <> 0) Then 
     MsgBox("Error while converting the document!!!")
   Else
     MsgBox("Done converting!!!")
   End If
 
End Sub



Copyright © 1999-2016 Neevia Technology. All Rights Reserved. Home | Products | Technical Support | About Us | Contact Us