PC Review


Reply
Thread Tools Rate Thread

DSO Summary Properties Error

 
 
John Michl
Guest
Posts: n/a
 
      20th Dec 2006
I use a small chunk of VBA to allow me to edit summary properties via
an Excel sheet. Basically, one macro retrieves a list of file names
from a folder, then list those names and various properties in a sheet
(properties include Title, Author, Subject, Category, etc.)

I have a second macro that changes the values of those properties if
they've been edited in the Excel file. Occasionally, I run into a
permission error when trying to update certain properties. It seems to
be localized to situations where the property's previous value was null
and I'm trying to change that value. If I use Windows Explorer to
change the value and then try to edit via my macro, it will work fine.

For some fields, like Title, I can remove a value and then use the
macro to add one without a problem. With other fields, like Category,
I'll get the error anytime I try to update it from null to something.

Any guidance would be appreciated. I've searched high and low and
can't seem to figure out what is happening.

- John

 
Reply With Quote
 
 
 
 
John Michl
Guest
Posts: n/a
 
      20th Dec 2006
Still having problems but here's a little more information. I've only
been able to create the problem on DOC files, XLS seem to update fine.
Also, I can update most properties but receive the permission denied
error if attempting to update Category, Manager or Company. I have two
sample Word DOCs created by right-clicking in Windows Explorer. No data
inside the files. One creates there errors. The other doesn't. I've
tried closing Windows Explorer to ensure that nothing is trying to
access the file. In addition, I've commented out the props mentioned
above and the code works fine...every time.

Any help would be appreciated.

Here's my code. It crashes at the .Category

Sub TestDSO()

Dim DSO As DSOFile.OleDocumentProperties
Set DSO = New DSOFile.OleDocumentProperties
strFile = "C:\Documents and Settings\mic06\My
Documents\TestFolder\Test1\ProblemFile.doc"
DSO.Open sfilename:=strFile

With DSO.SummaryProperties
.Title = "This is the Title"
.Subject = "This is the Subject"
.Category = "This is the Category"
End With

DSO.Save
DSO.Close
End Sub

On Dec 20, 1:02 pm, "John Michl" <waxwi...@gmail.com> wrote:
> I use a small chunk of VBA to allow me to edit summary properties via
> an Excel sheet. Basically, one macro retrieves a list of file names
> from a folder, then list those names and various properties in a sheet
> (properties include Title, Author, Subject, Category, etc.)
>
> I have a second macro that changes the values of those properties if
> they've been edited in the Excel file. Occasionally, I run into a
> permission error when trying to update certain properties. It seems to
> be localized to situations where the property's previous value was null
> and I'm trying to change that value. If I use Windows Explorer to
> change the value and then try to edit via my macro, it will work fine.
>
> For some fields, like Title, I can remove a value and then use the
> macro to add one without a problem. With other fields, like Category,
> I'll get the error anytime I try to update it from null to something.
>
> Any guidance would be appreciated. I've searched high and low and
> can't seem to figure out what is happening.
>
> - John


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Summary tab in properties Homer Windows XP General 4 4th May 2009 03:11 PM
Error Message: Summary properties Len Windows XP General 0 22nd Dec 2004 03:24 AM
Need to save rtf summary information, e.g. right-click document, Properties - Summary Steve Microsoft Dot NET Framework Forms 2 24th Nov 2004 09:30 AM
Cannot see all properties on Summary tab on File Properties seen from explorer. Sachin Arey Windows XP General 0 4th Mar 2004 05:42 AM
? How to get rid of Summary tab in MP3 properties Alec Soroudi Windows XP Music 0 15th Dec 2003 06:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:31 PM.