Set activation key
Namespace: SautinSoftAssembly: UseOffice (in UseOffice.dll) Version: 5.3.3.1
Syntaxpublic string Serial { set; }
Public WriteOnly Property Serial As String
Set
Property Value
String
RemarksAfter purchasing you will get the full version of product and your serial number. This parameter doesn't have any effect in the trial version. This parameter is necessary in full version, please don't forget to specify it by your serial number.
ExampleHow to activate the component after purchasing in C#
using System;
using System.IO;
using System.Collections;
namespace Sample
{
class Test
{
static void Main(string[] args)
{
SautinSoft.UseOffice u = new SautinSoft.UseOffice();
u.Serial = "1234567890";
string inpFile = Path.GetFullPath(@"..\..\..\..\..\Testing files\example.docx");
string outFile = Path.GetFullPath("Result.pdf");
int ret = u.InitWord();
if (ret == 1)
{
Console.WriteLine("Error! Can't load MS Word library in memory.");
return;
}
ret = u.ConvertFile(inpFile, outFile, SautinSoft.UseOffice.eDirection.DOCX_to_PDF);
u.CloseWord();
if (ret == 0)
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(outFile) { UseShellExecute = true });
}
else
Console.WriteLine("Error! Please contact with SautinSoft support: support@sautinsoft.com.");
}
}
}
How to activate the component after purchasing in VB.Net
Imports System
Imports System.IO
Imports System.Collections
Namespace Sample
Friend Class Test
Shared Sub Main(ByVal args() As String)
Dim u As New SautinSoft.UseOffice()
u.Serial = "1234567890"
Dim inpFile As String = Path.GetFullPath("..\..\..\..\Testing files\example.docx")
Dim outFile As String = Path.GetFullPath("Result.pdf")
Dim ret As Integer = u.InitWord()
If ret = 1 Then
Console.WriteLine("Error! Can't load MS Word library in memory.")
Return
End If
ret = u.ConvertFile(inpFile, outFile, SautinSoft.UseOffice.eDirection.DOCX_to_PDF)
u.CloseWord()
If ret = 0 Then
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(outFile) With {.UseShellExecute = True})
Else
Console.WriteLine("Error! Please contact with SautinSoft support: support@sautinsoft.com.")
End If
End Sub
End Class
End Namespace
See Also