GdPicture.NET.14
GdPicture14 Namespace / GdPictureDocumentConverter Class / SaveAsDOCX Method / SaveAsDOCX(String) Method
The file path where the converted file will be saved. If the specified file already exists, it will be overwritten.
Example





SaveAsDOCX(String) Method
This method converts the currently loaded document to DOCX and saves it to a specified file path.
Syntax
'Declaration
 
Public Overloads Function SaveAsDOCX( _
   ByVal FilePath As String _
) As GdPictureStatus
 

Parameters

FilePath
The file path where the converted file will be saved. If the specified file already exists, it will be overwritten.

Return Value

A member of the GdPictureStatus enumeration. If processing is successful, then the return value is GdPictureStatus.OK.
Remarks
You have to specify a full file path, including the file extension (.docx).
Example
Converting and saving a PDF document to a DOCX file.
Using gdpictureDocumentConverter As New GdPictureDocumentConverter()
    Dim status As GdPictureStatus = gdpictureDocumentConverter.LoadFromFile("input.pdf", GdPicture14.DocumentFormat.DocumentFormatPDF)
    If status = GdPictureStatus.OK Then
        gdpictureDocumentConverter.DocxImageQuality = 80
        status = gdpictureDocumentConverter.SaveAsDOCX("output.docx")
        If status = GdPictureStatus.OK Then
            MessageBox.Show("The file has been saved successfully.", "GdPicture")
        Else
            MessageBox.Show("The file has failed to save. Status: " + status.ToString(), "GdPicture")
        End If
    Else
        MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture")
    End If
End Using
See Also