473,511 Members | 16,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DSOFile Active X control for Word and Excel problem

Do
I keep getting this error message when I hit refresh in the browser when I
run this code.

"The file is currently open and cannot be read."

I usually kill the objects after I've read through them.
Is there something I'm missing?

Try

'Run document security check

Dim objDocUser As New user

Dim objFileProps As New PropertyReaderClass

Dim objPropReader As DocumentProperties

Dim strFolder As String

strFolder = Server.MapPath("../files/")

objPropReader = objFileProps.GetDocumentProperties(strFolder &
Request.QueryString("filename"))

Response.Write(objPropReader.Title())

objPropReader = Nothing

objFileProps = Nothing

'*********************

'Document security check should only be run against the forms authentication
ticket

'Remove the querystring, this is not for security

If objDocUser.isfoldermember(Request.QueryString("fol derid"), objUser.Name)
Then

lblDownload.Text = "<a href='../files/" & Request.QueryString("filename") &
"'>Download Now &gt;&gt;</a>"

Else

lblDownload.Text = "<B>You do not have rights to download this
document.</B>"

End If

objDocUser = Nothing

Catch ex As Exception

lblMessage.Text = ex.message

End Try


Nov 18 '05 #1
0 815

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

Similar topics

0
1704
by: | last post by:
I am using Microsoft's dsofile (http://support.microsoft.com/support/kb/articles/Q224/3/51.asp) in an ASP to update a set of custom properties in a Word document. The document properties are always...
14
8684
by: Curtis Tammany | last post by:
Hello- Can someone tell me if DSOFile.dll can be accessed within ASP.NET? DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following: Dim...
0
1598
by: Nautilus | last post by:
I am writing an application in ASP.Net which generates a list of files from a shared network folder using DirectoryInfo class and then I use the wonderful control, <a...
0
917
by: Do | last post by:
Hi, I can use DSOFile correctly to pull Word, Excel, and Powerpoint properties. Can't pull Visio and Access properties. Is this normal? Do
4
11139
by: Paul Bromley | last post by:
I have been pondering over this one all night!! I want to read the properties of a Word document WITHOUT opening it - notably the title document. Having read the newsgroups it seems that I neede to...
18
8268
by: Frank M. Walter | last post by:
Hello, I have made an small AddIn with udf for excel 2003. I use vs2003. The point of view is the function __T() I call it in excel sheet writing =__T() I am not able to set a value to a...
3
4516
by: natrajsr | last post by:
Hi, I want to load the data of a excel sheet or in the exact excel sheet format into a Rich TextBox control. I have already worked with loading WORD into a Rich TextBox. It is working fine.;...
0
1216
by: fblake | last post by:
FOR IMMEDIATE RELEASE Active Up expands ever popular product line Active Web.Controls 2007 V1, Active Cells V2 and Active AutoSuggest V1.0 Belgium (February 2007): Active Up today released...
0
2775
by: Fab117 | last post by:
Hello, When I write a word document, I have to put it in a common share For security I would like to always do a copy of it in my folder. I did it without trouble for my Excel workooks with :...
2
5693
by: sanjay1983 | last post by:
Hi Everyone, I am stuck to access file properties using 'Interop.dsofile.dll'. I dont want registration of this assembly in system registry. I am using reflection to achive this, but at the time...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
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...
0
7510
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...
0
4737
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...
0
3225
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...
0
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
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 ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
447
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...

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.