public void GetOriginalFileInfo()
{
//ExStart
//ExFor:Document.OriginalFileName
//ExFor:Document.OriginalLoadFormat
//ExSummary:Shows how to retrieve the details of the path, filename and LoadFormat of a document from when the document was first loaded into memory.
Document doc = new Document(MyDir + "Document.doc");
// This property will return the full path and file name where the document was loaded from.
string originalFilePath = doc.OriginalFileName;
// Let's get just the file name from the full path.
string originalFileName = Path.GetFileName(originalFilePath);
// This is the original LoadFormat of the document.
LoadFormat loadFormat = doc.OriginalLoadFormat;
//ExEnd
}