S
Steve Lang
Hi all,
I am trying to use the DSOleFile.dll in my VB.NET application (that I am
converting from VB6) to extract some property data from a Word document
before the application processes the file. The key feature of the dll is
that it allows the data to be extracted without the document opening in
Word; I successfully used it in VB6 without a problem.
Under .NET, however, after I use a function that calls the dll, the function
appears to keep the file open, so my app can't delete it as it is supposed
to. The code is below:
Private oFilePropReader As DSOleFile.PropertyReader
Private oDocProp As DSOleFile.DocumentProperties
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Public Function getLastEditProperty(ByVal strDoc As String) As String
Dim oFilePropReader As New DSOleFile.PropertyReader
oDocProp = oFilePropReader.GetDocumentProperties(cXFer & strDoc & ".doc")
getLastEditProperty = oDocProp.LastEditedBy
oDocProp = Nothing
oFilePropReader = Nothing
End Function
Anybody have any ideas on how to force a release? Am fairly new to .NET...
is there something I am missing?
TIA and have a great day!
Steve Lang
I am trying to use the DSOleFile.dll in my VB.NET application (that I am
converting from VB6) to extract some property data from a Word document
before the application processes the file. The key feature of the dll is
that it allows the data to be extracted without the document opening in
Word; I successfully used it in VB6 without a problem.
Under .NET, however, after I use a function that calls the dll, the function
appears to keep the file open, so my app can't delete it as it is supposed
to. The code is below:
Private oFilePropReader As DSOleFile.PropertyReader
Private oDocProp As DSOleFile.DocumentProperties
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Public Function getLastEditProperty(ByVal strDoc As String) As String
Dim oFilePropReader As New DSOleFile.PropertyReader
oDocProp = oFilePropReader.GetDocumentProperties(cXFer & strDoc & ".doc")
getLastEditProperty = oDocProp.LastEditedBy
oDocProp = Nothing
oFilePropReader = Nothing
End Function
Anybody have any ideas on how to force a release? Am fairly new to .NET...
is there something I am missing?
TIA and have a great day!
Steve Lang