Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Update File | Summary | Attributes

Reply
Thread Tools

Update File | Summary | Attributes

 
 
Michael Reynolds
Guest
Posts: n/a
 
      10-11-2005
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




 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      10-12-2005
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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
data attributes override method attributes? Jayden Python 16 09-29-2012 03:20 AM
attributes ala java annotations or .Net attributes? Kyle Schmitt Ruby 3 07-24-2007 07:48 PM
class attributes & data attributes james_027 Python 2 06-20-2007 03:12 PM
WebControl.Attributes.Add and custom attributes P4trykx ASP .Net 2 01-31-2007 04:33 PM
Parse reserved attributes as normal attributes Max XML 1 09-22-2006 12:04 PM



Advertisments