PC Review


Reply
Thread Tools Rate Thread

Checking HasPassword property without opening

 
 
=?Utf-8?B?U3ByaW5rcw==?=
Guest
Posts: n/a
 
      24th Oct 2006
Looping through a FileSearch.FoundFiles object's collection, I have all the
filenames in a given directory. If the file has a password, I'd like to
change it to a new value. Can I do this without opening the file?

' pseudocode
Dim fs as FileSearch
If (the workbook corresponding to fs.FoundFiles(i)).HasPassword Then
Open
.Password = strNew
.Save
.Close
End If

Can anyone help?
Sprinks
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      24th Oct 2006
I don't think so.


Sprinks wrote:
>
> Looping through a FileSearch.FoundFiles object's collection, I have all the
> filenames in a given directory. If the file has a password, I'd like to
> change it to a new value. Can I do this without opening the file?
>
> ' pseudocode
> Dim fs as FileSearch
> If (the workbook corresponding to fs.FoundFiles(i)).HasPassword Then
> Open
> .Password = strNew
> .Save
> .Close
> End If
>
> Can anyone help?
> Sprinks


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?U3ByaW5rcw==?=
Guest
Posts: n/a
 
      25th Oct 2006
Thanks, Dave.

Sprinks

"Dave Peterson" wrote:

> I don't think so.
>
>
> Sprinks wrote:
> >
> > Looping through a FileSearch.FoundFiles object's collection, I have all the
> > filenames in a given directory. If the file has a password, I'd like to
> > change it to a new value. Can I do this without opening the file?
> >
> > ' pseudocode
> > Dim fs as FileSearch
> > If (the workbook corresponding to fs.FoundFiles(i)).HasPassword Then
> > Open
> > .Password = strNew
> > .Save
> > .Close
> > End If
> >
> > Can anyone help?
> > Sprinks

>
> --
>
> Dave Peterson
>

 
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
VBA - checking for existance of a property B Microsoft Excel Programming 2 24th May 2008 05:03 PM
Conflicting used space information when checking the drive property against marking all files and checking the marked file properties. elloko Windows XP Configuration 3 19th Dec 2004 05:34 AM
Checking validity of a property on set() Sam Martin Microsoft C# .NET 3 3rd Nov 2004 03:52 PM
property dirty checking Erik Frey Microsoft ADO .NET 3 23rd Mar 2004 05:05 PM
open doc with vb but need to see if haspassword first? mac Microsoft Word Document Management 1 12th Feb 2004 11:14 PM


Features
 

Advertising
 

Newsgroups
 


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