HowTo : Using FindFile to retrieve the full filename of an opened Document
Article | 60001489 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 9/12/2011 |
Submitted by | Claude UZAN |
Keywords | |
Subject
Using FindFile to retrieve the full filename of an opened Document
Summary
Using FindFile to retrieve the full filename of an opened Document
Solution
The Filename property of the vdDocument returns the filename that is being passed to the Open procedure of the Document
vdFramedControl.BaseControl.ActiveDocument.Open ("test.vdml");
MessageBox.Show(vdFramedControl.BaseControl.ActiveDocument.FileName);
The above code will return "test.vdml" as Filename.
If you want to get the full filename of this file you can use the FindFile method of vdDocument as following
string retFilename = "";
bool ret = vdFramedControl.BaseControl.ActiveDocument.FindFile(vdFramedControl.BaseControl.ActiveDocument.FileName, out retFilename);
if (ret) MessageBox.Show (retFilename);
And this way you can get the full filename of your file.