View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
FrigidDigit[_2_] FrigidDigit[_2_] is offline
external usenet poster
 
Posts: 32
Default ATT: Ron de Bruin (ADO help)

Thanks for the input Dave.
FD

"Dave Peterson" wrote in message
...
For me (with Adobe Reader 7.0 installed), I got:
Adobe Acrobat 7.0 Document

But I think I'd stay away from anything that specific.

I'd just check the extension:

if lcase(right(objfile.name,4)) = ".pdf" then
'it's a pdf
end if



FrigidDigit wrote:

Hi all,

Can anyone tell me how I can determine which type to use in the code
below
for, for instance, what should objFile.Type be if I want to loop through
only pdf or zip files. Is there any way in which I can find out which
type
to use for any file?

For Each objFile In objFolder.Files
If objFile.Type = "Microsoft Excel Worksheet" Then

Thanks!

FD

"FrigidDigit" wrote in message
...
Thanks Tom,

Will have to find another solution then.
FD

"Tom Ogilvy" wrote in message
...
the workbook is saved in an encrypted format. unprotecting it would
require
opening it and saving it as an unencrypted file.

--
Regards,
Tom Ogilvy

"FrigidDigit" wrote in message
...
Rowan,

Your suggestion about the worksheet protection was on the money, can
I
unprotect the workbook via VBA without opening it?

Thanks for all your help.

FD

"Rowan Drummond" wrote in message
...
No idea on that one I am afraid.

Some guesses: check that you can open the file normally in excel
(it's
not
corrupted) and that it is not password protected.

Good luck
Rowan

FrigidDigit wrote:
Rowan,

Sorry one more question,

I have added another excel workbook to one of the folders i am
looping
through and suddenly when trying to extract cell values from that
file,
VBA returns a runtime error'-2147467259 (800004005) could not
decrypt
file error.

Any idea what is causing this?

Thanks again

FD








--

Dave Peterson