473,804 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change the file | Summary | Title

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.Summary Properties

Dim oCustProp As DSOFile.CustomP roperty

Dim sFile, sTmp As String

Dim m_oDocument As DSOFile.OleDocu mentPropertiesC lass

m_oDocument = New DSOFile.OleDocu mentPropertiesC lass

' Note: fileName is just a local file...in this case, c:\test.txt.

m_oDocument.Ope n(fileName, False, _

DSOFile.dsoFile OpenOptions.dso OptionOpenReadO nlyIfNoWriteAcc ess)

If Not m_oDocument.IsR eadOnly Then

oSummProps = m_oDocument.Sum maryProperties

oSummProps.Titl e = myNewTitle

m_oDocument.Sav e()

End If

m_oDocument.Clo se()

m_oDocument = Nothing

Nov 19 '05 #1
1 1090
Hi Michael:

You should be able to set the properties. Is there an exception or
error message? You might be facing a permissions issue.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 13 Oct 2005 10:22:02 -0700, "Michael Reynolds"
<Mi************ *@discussions.m icrosoft.com> 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 file attributes?

Here's the code I'm using:

Dim oSummProps As DSOFile.Summary Properties

Dim oCustProp As DSOFile.CustomP roperty

Dim sFile, sTmp As String

Dim m_oDocument As DSOFile.OleDocu mentPropertiesC lass

m_oDocument = New DSOFile.OleDocu mentPropertiesC lass

' Note: fileName is just a local file...in this case, c:\test.txt.

m_oDocument.Op en(fileName, False, _

DSOFile.dsoFile OpenOptions.dso OptionOpenReadO nlyIfNoWriteAcc ess)

If Not m_oDocument.IsR eadOnly Then

oSummProps = m_oDocument.Sum maryProperties

oSummProps.Titl e = myNewTitle

m_oDocument.Sav e()

End If

m_oDocument.Cl ose()

m_oDocument = Nothing


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1278
by: K R | last post by:
Hi, I have generated this XML from my application. But, when I open this XML, it is throwing error. Please help me to resolve this. <?xml version="1.0" encoding="utf-8" ?> <searchResults> <totalhits>16916</totalhits> <searchquery>*</searchquery> <timetaken>TIME TAKEN</timetaken>
33
3308
by: bissatch | last post by:
Hi, I fully understand the purpose of an alt attribute within a <img> tag but why would you use a title or summary attribute within, for example, a <p> tag. I have read books recommending that I use them but why? Does this enhance accessibility? Please provide reasons why one would want to use these? Thanks Burnsy
3
1545
by: K R | last post by:
Hi, I have generated this XML from my application. But, when I open this XML, it is throwing error. Please help me to resolve this. <?xml version="1.0" encoding="utf-8" ?> <searchResults> <totalhits>16916</totalhits> <searchquery>*</searchquery> <timetaken>TIME TAKEN</timetaken>
5
9864
by: Ram [MSFT] | last post by:
Hi All, I'm trying to programatically (using c#) read the file properties (Title, Summary, Author, Comments etc.... The stuff that shows up on the Summary tab when you see the properties of a file). FileInfo and FileSystemInfo classes expose only the standard properties (create time, mod time etc..). Any pointers would be greatly appreciated. Thanks, Ram Thiru
0
1452
by: MS | last post by:
Is the schema used to validate XML Documentation Comments available to be changed by a VS.Net user? I suspect the this question is no so have a couple of requests: 1.) I use #region extensively along with the Outlining key functions to organize and navigate my code. In general, having an uncatagorized list of undifferentiated declarations in the generated HTML documentation is not all that helpful. Please have VS.Net do one of the...
4
4134
by: Eric | last post by:
Hello, I am having some sort of security issue with my code. When I change a file's title in a Windows or console app, I have no problems. (I am using Microsoft's article & DsoFile.dll: http://support.microsoft.com/default.aspx?scid=kb;en-us;224351) When I run it in ASP.NET, I get a "file not found" exception, even though the file does exist.
14
7353
by: Rob Meade | last post by:
Hi all, I'm working on a project where there are just under 1300 course files, these are HTML files - my problem is that I need to do more with the content of these pages - and the thought of writing 1300 asp pages to deal with this doesn't thrill me. The HTML pages are provided by a training company. They seem to be "structured" to some degree, but I'm not sure how easy its going to be to parse the page.
0
1273
by: Petded | last post by:
Hi im just starting to look at doing some visual c++ winforms stuff using the latest vc++ express edition download im generally familiar with c++. When i generate a winforms i want to name the forms with a relevant name, i know this is also the class name ,not only the title which i know can be changed using the text paramter, but i want to set custom form names at design time.
0
2496
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form containing a Edit(textbox) and button to test at first. When I change text in Edit or press button to setText value, I want to monitor the change event. But the event code always return 0, why?
3
4037
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user selects? thanks...
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10327
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.