Click or drag to resize

UseOfficeeDirection Enumeration

Available converting directions

Namespace: SautinSoft
Assembly: UseOffice (in UseOffice.dll) Version: 2024.12.12
Syntax
public enum eDirection
Members
Member nameValueDescription
PDF_to_DOCX0 Convert *.pdf to *.docx. Works only in MS Office 2013 or higher.
PDF_to_DOC1 Convert *.pdf to *.doc. Works only in MS Office 2013 or higher.
PDF_to_RTF2 Convert *.pdf to *.rtf. Works only in MS Office 2013 or higher.
PDF_to_TEXT3 Convert *.pdf to *.txt. Works only in MS Office 2013 or higher.
DOCX_to_DOCX4 Convert *.docx to *.docx, Word to Word 2007/2010
DOC_to_DOCX5 Convert *.doc to *.docx, Word to Word 2007/2010
DOC_to_HTML6 Convert *.doc to *.html, MS Word (DOC) to HTML
DOC_to_WEBARCHIVE7 Convert *.doc to *.mht, Word to Web-archive
DOC_to_XML8 Convert *.doc to *.xml, MS Word (DOC) to XML
DOC_to_RTF9 Convert *.doc to *.rtf, MS Word (DOC) to RTF
DOC_to_PDF10 Convert *.doc to *.pdf, Word to Adobe PDF
DOC_to_TEXT11 Convert *.doc to *.txt, Word to ANSI Text
DOC_to_UNICODETEXT12 Convert *.doc to *.txt, Word to Unicode Text
DOCX_to_HTML13 Convert *.docx to *.HTML, DOCX to HTML
DOCX_to_WEBARCHIVE14 Convert *.docx to *.mht, DOCX to Web-archive
DOCX_to_XML15 Convert *.docx to *.xml, DOCX to XML
DOCX_to_XPS16 Convert *.docx to *.xps, DOCX to XPS
DOCX_to_RTF17 Convert *.docx to *.rtf, DOCX to RTF
DOCX_to_PDF18 Convert *.docx to *.pdf, DOCX to Adobe PDF
DOCX_to_TEXT19 Convert *.docx to *.txt, DOCX to ANSI Text
DOCX_to_UNICODETEXT20 Convert *.docx to *.txt, DOCX to Unicode Text
HTML_to_DOC21 Convert *.htm* to *.doc, HTML to MS Word (DOC)
HTML_to_DOCX22 Convert *.htm* to *.docx, HTML to MS Word (DOCX)
HTML_to_RTF23 Convert *.htm* to *.rtf, HTML to MS Word (RTF)
HTML_to_PDF24 Convert *.htm* to *.pdf, HTML to Adobe PDF
HTML_to_TEXT25 Convert *.htm* to *.txt, HTML to ANSI Text
HTML_to_UNICODETEXT26 Convert *.htm* to *.txt, HTML to Unicode Text
RTF_to_TEXT27 Convert *.rtf to *.txt, RTF to ANSI Text
RTF_to_UNICODETEXT28 Convert *.rtf to *.txt, RTF to Unicode Text
RTF_to_HTML29 Convert *.rtf to *.html, RTF to HTML with CSS
RTF_to_WEBARCHIVE30 Convert RTF to *.mht (Web-archive)
RTF_to_XML31 Convert *.rtf to *.xml, RTF to XML
RTF_to_DOC32 Convert *.rtf to *.doc, RTF to MS Word (DOC)
RTF_to_DOCX33 Convert *.rtf to *.docx, RTF to MS Word (DOCX)
RTF_to_PDF34 Convert *.rtf to *.pdf, RTF to Adobe PDF
TEXT_to_PDF35 Convert *.txt to *.pdf, Text to Adobe PDF
TEXT_to_RTF36 Convert *.txt to *.rtf, Text to RTF
TEXT_to_DOC37 Convert *.txt to *.doc, Text to DOC (MS Word 97-2003)
TEXT_to_DOCX38 Convert *.txt to *.docx, Text to DOCX
XLSX_to_XLS39 Convert *.xlsx to *.xls
XLS_to_XLSX40 Convert *.xls to *.xlsx
XLS_to_RTF41 Convert *.xls to *.rtf, Excel to RTF
XLS_to_PDF42 Convert *.xls to *.pdf, Excel to PDF
XLSX_to_RTF43 Convert *.xlsx to *.rtf, Excel to RTF
XLSX_to_PDF44 Convert *.xlsx to *.pdf, Excel to PDF
XLS_to_HTML45 Convert *.xls to *.html, Excel to HTML
XLSX_to_HTML46 Convert *.xlsx to *.html, Excel to HTML
XLS_to_WEBARCHIVE47 Convert *.xls to *.mht, Excel to Web-archive
XLSX_to_WEBARCHIVE48 Convert *.xlsx to *.mht, Excel to Web-archive
XLS_to_XML49 Convert *.xls to *.xml, Excel to XML
XLSX_to_XML50 Convert *.xlsx to *.xml, Excel to XML
XLS_to_TEXT51 Convert *.xls to *.txt, Excel to ANSI Text
XLSX_to_TEXT52 Convert *.xlsx to *.txt, Excel to ANSI Text
XLS_to_CSV53 Convert *.xls to *.csv
XLSX_to_CSV54 Convert *.xlsx to *.csv
PPT_to_HTML55 Convert *.ppt to *.html, PowerPoint to HTML
PPT_to_WEBARCHIVE56 Convert *.ppt to *.mht, PowerPoint to Web-archive
PPT_to_XML57 Convert *.ppt to *.xml, PowerPoint to XML
PPT_to_RTF58 Convert *.ppt to *.rtf, PowerPoint to RTF
PPT_to_PDF59 Convert *.ppt to *.pdf, PowerPoint to Adobe PDF
PPT_to_JPG60 Convert *.ppt to *.jpg, PowerPoint to JPEG
PPT_to_BMP61 Convert *.ppt to *.bmp, PowerPoint to BMP
PPT_to_GIF62 Convert *.ppt to *.gif, PowerPoint to GIF
PPT_to_PPTX63 Convert *.ppt to *.pptx, PowerPoint (97-2003) to PowerPoint Presentation.
PPTX_to_HTML64 Convert *.pptx to *.html, PowerPoint to HTML
PPTX_to_WEBARCHIVE65 Convert *.pptx to *.mht, PowerPoint to Web-archive
PPTX_to_XML66 Convert *.pptx to *.xml, PowerPoint to XML
PPTX_to_RTF67 Convert *.pptx to *.rtf, PowerPoint to RTF
PPTX_to_PDF68 Convert *.pptx to *.pdf, PowerPoint to Adobe PDF
PPTX_to_JPG69 Convert *.pptx to *.jpg, PowerPoint to JPEG
PPTX_to_BMP70 Convert *.pptx to *.bmp, PowerPoint to BMP
PPTX_to_GIF71 Convert *.pptx to *.gif, PowerPoint to GIF
PPTX_to_PPT72 Convert *.pptx to *.ppt, PowerPoint Presentation to the old format PowerPoint (97-2003).
ACCESS_to_PDF73 Convert *.accdb to *.pdf, MS Access to PDF
ACCESS_to_RTF74 Convert *.accdb to *.pdf, MS Access to RTF
ACCESS_to_HTML75 Convert *.accdb to *.pdf, MS Access to HTML
ACCESS_to_TEXT76 Convert *.accdb to *.pdf, MS Access to Text
Example
How to convert a PPTX file to a JPG file in C#
using System;
using System.IO;
using System.Collections;

namespace Sample
{
    class Test
    {
        static void Main(string[] args)
        {
            // Before starting, we recommend to get a free 100-day key:
            // https://sautinsoft.com/start-for-free/

            // Apply the key here:
            // UseOffice.SetLicense("...");

            // Convert PPTX file to JPG file
            // If you need more information about UseOffice .Net email us at:
            // support@sautinsoft.com.
            SautinSoft.UseOffice u = new SautinSoft.UseOffice();

            string inpFile = Path.GetFullPath(@"..\..\..\..\..\..\TestFiles\example.pptx");
            string outFolder = Path.GetFullPath(@"Result");

            // Prepare UseOffice .Net, loads MS PowerPoint in memory
            int ret = u.InitPowerPoint();

            // Return values:
            // 0 - Loading successfully
            // 1 - Can't load MS PowerPoint library in memory
            if (ret == 1)
            {
                Console.WriteLine("Error! Can't load MS PowerPoint library in memory");
                return;
            }

            // Perform the conversion.
            ret = u.ConvertFile(inpFile, outFolder, SautinSoft.UseOffice.eDirection.PPTX_to_JPG);

            // Release MS PowerPoint from memory
            u.ClosePowerPoint();

            // 0 - Converting successfully
            // 1 - Can't open input file. Check that you are using full local path to input file, URL and relative path are not supported
            // 2 - Can't create output file. Please check that you have permissions to write by this path or probably this path already used by another application
            // 3 - Converting failed, please contact with our Support Team
            // 4 - MS Office isn't installed. The component requires that any of these versions of MS Office should be installed: 2000, XP, 2003, 2007, 2010, 2013, 2016 or 2019.
            if (ret == 0)
            {
                Console.WriteLine("Converting successfully!");
                // Open the result.
                System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(outFolder) { UseShellExecute = true });

            }
            else
                Console.WriteLine("Error! Please contact with SautinSoft support: support@sautinsoft.com.");
        }
    }
}
How to convert a PPTX file to a JPG file in VB.Net
Imports System
Imports System.IO
Imports System.Collections

Namespace Sample
    Friend Class Test
        Shared Sub Main(ByVal args() As String)

            ' Before starting, we recommend to get a free 100-day key:
            ' https://sautinsoft.com/start-for-free/

            ' Apply the key here:
            ' UseOffice.SetLicense("...");
            ' Convert PPTX file to JPG file
            ' If you need more information about UseOffice .Net email us at:
            ' support@sautinsoft.com.
            Dim u As New SautinSoft.UseOffice()

            Dim inpFile As String = Path.GetFullPath("..\..\..\..\..\..\TestFiles\example.pptx")
            Dim outFolder As String = Path.GetFullPath("Result")

            ' Prepare UseOffice .Net, loads MS PowerPoint in memory
            Dim ret As Integer = u.InitPowerPoint()

            ' Return values:
            ' 0 - Loading successfully
            ' 1 - Can't load MS PowerPoint library in memory
            If ret = 1 Then
                Console.WriteLine("Error! Can't load MS PowerPoint library in memory")
                Return
            End If

            ' Perform the conversion.
            ret = u.ConvertFile(inpFile, outFolder, SautinSoft.UseOffice.eDirection.PPTX_to_JPG)

            ' Release MS PowerPoint from memory
            u.ClosePowerPoint()

            ' 0 - Converting successfully
            ' 1 - Can't open input file. Check that you are using full local path to input file, URL and relative path are not supported
            ' 2 - Can't create output file. Please check that you have permissions to write by this path or probably this path already used by another application
            ' 3 - Converting failed, please contact with our Support Team
            ' 4 - MS Office isn't installed. The component requires that any of these versions of MS Office should be installed: 2000, XP, 2003, 2007, 2010, 2013, 2016 or 2019.
            If ret = 0 Then
                Console.WriteLine("Converting successfully!")
                ' Open the result.
                System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(outFolder) 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