UseOffice .Net - .Net component to convert between RTF, DOC, HTML, XLS, PPT Text.
version 1.1 (March 03rd, 2008)
  HelpContent | About UseOffice .Net| Methods and properties | Samples of using in C#, VB.Net, ASP.Net| License | Pricing | Support and Contanst

Using UseOffice .Net version in VB.Net and C#



 C#
 VB.Net 
 VB.Net and C# - convert DOC to PDF, XLS to PDF and PPT to PDF
(converting together with PDF Metamorphosis .Net) (505 Kb)



C# sample - download (596 Bytes)

1. Place the files "UseOffice.dll" into your bin directory.

2. In VisualStudio.net manually add a reference to the file UseOffice.dll via "Add reference" for the current project
.

 

3. C# code sample:
using System;
namespace ExampleUseOffice { class ExampleClass { static void Main(string[] args) { //create object (instance) of UseOffice SautinSoft.UseOffice p = new SautinSoft.UseOffice() //Load MS Office objects into memory if (p.InitOffice()!=0); return;//error initialization office int i = p.DocToHtmlConvertFile(@"e:\1.doc",@"e:\1.html");//cobvert file //Release MS Office objects p.CloseOffice(); //Check for errors return i;
} } }

VB.Net sample - download (320 Bytes)

1. Place the files "UseOffice.dll" into your bin directory.

2. In VisualStudio.net manually add a reference to the file UseOffice.dll via "Add reference" for the current project
.

 

3. VB.Net code sample:
Module Module1
Sub Main()
Dim p As New SautinSoft.UseOffice
p.InitOffice()
p.SetSerial("XXXXXXXXXX")
p.DocToHtmlConvertFile("D:\1.doc", "D:\1.html")
p.CloseOffice()
End Sub
End Module