By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,933 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,933 IT Pros & Developers. It's quick & easy.

Update File | Summary | Attributes

P: n/a
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 files?

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.dsoOptionOpenReadOnlyIf NoWriteAccess)

If Not m_oDocument.IsReadOnly Then

oSummProps = m_oDocument.SummaryProperties

oSummProps.Title = myNewTitle

m_oDocument.Save()

End If

m_oDocument.Close()

m_oDocument = Nothing


Oct 11 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Michael Reynolds wrote:
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 files?

Here's the code I'm using:

Dim oSummProps As DSOFile.SummaryProperties

Hmm, this does not look like vbscript, so I can only assume it is vb.net, in
which case:

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.

As for your question, I would suggest reading the documentation for the
DSOFile class. If that does not help, post to the dotnet newsgroup.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Oct 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.