G
Guest
I can read file attributes just fine (author, title, etc,)
But there's no way to update them. I know windows application can do it,
but can a web application update these file attributes?
Here's the code I'm using:
Dim oSummProps As DSOFile.SummaryProperties
Dim oCustProp As DSOFile.CustomProperty
Dim sFile, sTmp As String
Dim m_oDocument As DSOFile.OleDocumentPropertiesClass
m_oDocument = New DSOFile.OleDocumentPropertiesClass
' Note: fileName is just a local file...in this case, c:\test.txt.
m_oDocument.Open(fileName, False, _
DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
If Not m_oDocument.IsReadOnly Then
oSummProps = m_oDocument.SummaryProperties
oSummProps.Title = myNewTitle
m_oDocument.Save()
End If
m_oDocument.Close()
m_oDocument = Nothing
But there's no way to update them. I know windows application can do it,
but can a web application update these file attributes?
Here's the code I'm using:
Dim oSummProps As DSOFile.SummaryProperties
Dim oCustProp As DSOFile.CustomProperty
Dim sFile, sTmp As String
Dim m_oDocument As DSOFile.OleDocumentPropertiesClass
m_oDocument = New DSOFile.OleDocumentPropertiesClass
' Note: fileName is just a local file...in this case, c:\test.txt.
m_oDocument.Open(fileName, False, _
DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
If Not m_oDocument.IsReadOnly Then
oSummProps = m_oDocument.SummaryProperties
oSummProps.Title = myNewTitle
m_oDocument.Save()
End If
m_oDocument.Close()
m_oDocument = Nothing