Files: properties and methods

 


Several different VBA libraries contain methods to retrieve file properties or to manipulate files.
Sometimes a library contains unique methods, sometimes they are equivalents to methods in another library.
Which method you can use can be dependent of whether a file has been loaded or not.

In the examples in this page we'll illustrate the following libraries:
VBA
Excel VBA
Word VBA
Scripting ("scripting.filesystemobject")
Shell ("shell.application")
Shellscripting ("wscript.shell")

In VBA you can refer to an open file in several ways:
the file that contains the code that is being executed:
in Word: ThisDocument
in Excel: ThisWorkbook

the most recent active file:
in Word: ActiveDocument
in Excel: ActiveWorkbook
in Powerpoint: ActivePresentation

the name of a member in the collection of open files:
in Word: Documents("name.doc")
in Excel : Workbooks("name.xls")

the indexnumber in the collection of open files:
in Word: Documents(1)
in Excel: Workbooks(1)

In the examples we'll use ThisWorkbook (Excel) and ThisDocument (Word)
As a default each example uses an Excel file ThisWorkbook; if it's marked green you can always replace that by ThisDocument in Word.
The use of ThisDocument indicates it's an exclusive property/method in Word.

For every property an example of the possible result is indicated in darkred, as far as I'm familiar with it's possible result.

The number of properties of an open file exceeds those of a closed file.
They will be treated separately.

Loaded fileClosed file

Properties
 
Name: fullname; drive + path + name + extension Name: fullname; drive + pad + name + extension
Name: name + extension Name: name + extension
Name: name without extension Name: name without extension
Name: extension Name: extension
Name: VBA name  
Name: DOS - name Name: DOS - name
Name: DOS - fullname Name: DOS - fullname
Path: full path without slash, unless in a rootdirectory Path: full path without slash, unless in a rootdirectory
Path: foldername without path Path: foldername without path
Drive: drivename Drive: drivename
Drive: drivenumber Drive: drivenumber
Drive: driveletter + : Drive: driveletter + :
Drive: free space on filecontaining drive Drive: free space on filecontaining drive
Application  
Type Type
Filetype  
Size: filesize / filelength in bytes Size: filesize / filelength in bytes
Size: filesize in kbytes Size: filesize in kbytes
Size: filesize in Mbytes Size: filesize in Mbytes
Attribute: VBA constant Attribute: VBA constant
Attribute: Character Attribute: Character
Attribute: readonly  
Date/time: file created Date/time: file created
Date/time: file last accessed Date/time: file last accessed
Date/time: last modified Date/time: last modified
Date/time: last printed  
Link Link
Browsable Browsable
File File
Folder Folder
File exists File exists
Status Status
Owner Owner
Version Version
Program description Program description
Description Description
File Version File Version
Product Name Product Name
Product Version Product Version
Title Title
Subject Subject
Author Author
Keywords  
Comments Comments
Template  
Last author  
Revision number  
Security  
Category Category
Format  
Manager  
Company Company
Hyperlink base  

Word and Powerpoint files
 
Total editing Time 
Number of Paragraphs 

Word files
 
Number of Words  
Number of Pages Number of Pages
Number of Lines 
Number of Characters 
Number of Characters with spaces 

Powerpoint Files
 
Number of Slides 
Number of comments 
Number of hidden Slides 
Number of Multimediaclips 

Music Files
 
Copyright Copyright
Artist Artist
Album Title Album Title
Year Year
Track Number Track Number
Genre Genre
Duration Duration
Bitrate Bitrate
Protected Protected
Audio Sample Size Audio Sample Size
Sample Rate Sample Rate
Channels Channels

Photo files
 
Camera Model Camera Model
Date Picture taken Date Picture taken
Dimensions Dimensions
Pixels horizontally Pixels horizontally
Pixels vertically Pixels vertically


Loaded fileUnloaded file

Methods
 

Copy file
 
Copy loaded file
Copy 1 closed file
  Copy several closed files

Move file
 
Move open file
Move 1 closed file to another folder
  Move 1 closed file within the same folder
  Move several closed files to another folder
  Move several closed files within the same folder

Method: delete/remove file
 
  Delete/remove 1 closed file
  Delete/remove several closed files

New Excel file
 
  New visible Excel file in existing Excel instance
  New invisible Excel file in existing Excel instance
  New invisible Excel file in new Excel instance

New Word file
 
  New visible Word file in existing Word instance
  New invisible Word file in existing Word instance
  New invisible Word file in new Word instance

New TXT/CSV file
 
  New TXT/CSV file


I Properties: open/loaded file

Name: fullname; drive + path + name + extension

"E:\OF\example.xls"
c_00 =ThisWorkbook.FullName
c_00 = CreateObject("scripting.filesystemobject").GetAbsolutePathname(ThisWorkbook.FullName)
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).Path
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).Path

Name: name including extension

"example.xls"
c_00 =ThisWorkbook.Name
c_00 =Dir(ThisWorkbook.FullName))
c_00 = CreateObject("scripting.filesystemobject").GetFileName(ThisWorkbook.FullName)
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).Name
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).Name
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 0)
End With
c_00 = Mid(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 45)

Name: name without extension

"example"
c_00 = CreateObject("scripting.filesystemobject").GetBaseName(ThisWorkbook.FullName)

Name: extension

"xls"
c_00 = CreateObject("scripting.filesystemobject").GetExtensionName(ThisWorkbook.FullName)

Name: VBA name

"ThisWorkbook"
c_00 =ActiveWorkbook.CodeName

Name: DOS - name

"VOORBE~1.XLS"
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).shortname
c_00 = Left(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 12)

Name: DOS - fullname

"E:\OF\VOORBE~1.XLS"
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).shortpath

Path: fullpath without slash, unless in a rootdirectory

"E:\OF"
c_00 =ThisWorkbook.Path
c_00 = CreateObject("scripting.filesystemobject").GetParentFolderName(ThisWorkbook.FullName)
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).parentfolder

Path: foldername without path

"OF"
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).Parent

Drive: drivename

"GEGEVENS ."
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(1)

Drive: drivenumber

"4FB9-3D9B"
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(2)

Drive: drive character + :

"E:"
c_00 = CreateObject("scripting.filesystemobject").GetDriveName(ThisWorkbook.FullName)
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).drive
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(3)

Drive: free space in the drive that contains the opened file

"465. (..) bytes"
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(7)

Application

"Microsoft Excel"
c_00 =ThisWorkbook.Application
c_00 =ThisWorkbook.Parent
c_00 =ThisWorkbook.BuiltinDocumentProperties(9)
c_00 =ThisWorkbook.BuiltinDocumentProperties("application name")

Type

"Microsoft Excel worksheet"
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).Type
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).Type
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(ThisWorkbook.Name), -1),vblf)(0)
End With
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(Thisworkbook.Name), -1),vblf),"Type: "),""),7)
End With

Music file (mp3)

With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(4)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Type: "),""),7)
End With

Image file

With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(3)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Type: "),""),7)
End With

Fileformat

Excel
56

c_00 =ThisWorkbook.FileFormat
-4158xlCurrentPlatformText 11xlDBF4 20xlTextWindows 29xlExcel3 39xlExcel5 50xlExcel12
-4143xlWorkbookNormal 14xlWJ2WD1 21xlTextMSDOS 30xlWK1FMT 39xlExcel7 51xlOpenXMLWorkbook
2xlSYLK 15xlWK3 22xlCSVMac 31xlWK1ALL 40xlWJ3 51xlWorkbookDefault
4xlWKS 16xlExcel2 23xlCSVWindows 32xlWK3FM3 41xlWJ3FJ3 52xlOpenXMLWorkbookMacroEnabled
5xlWK1 17xlTemplate 24xlCSVMSDOS 33xlExcel4 42xlUnicodeText 53xlOpenXMLTemplateMacroEnabled
6xlCSV 17xlTemplate8 25xlIntlMacro 34xlWQ1 43xlExcel9795 54xlOpenXMLTemplate
7xlDBF2 18xlAddIn 26xlIntlAddIn 35xlExcel4Workbook 44xlHtml 55xlOpenXMLAddIn
8xlDBF3 18xlAddIn8 27xlExcel2FarEast 36xlTextPrinter 45xlWebArchive 56xlExcel8
9xlDIF 19xlTextMac 28xlWorks2FarEast 38xlWK4 46xlXMLSpreadsheet 60xlOpenDocumentSpreadsheet

Word
0

c_00 =ThisDocument.SaveFormat
0wdFormatDocument 3wdFormatTextLineBreaks 7wdFormatEncodedText 12wdFormatXMLDocument 17wdFormatPDF
0wdFormatDocument97 4wdFormatDOSText 8wdFormatHTML 13wdFormatXMLDocumentMacroEnabled 18wdFormatXPS
1wdFormatTemplate 5wdFormatDOSTextLineBreaks 9wdFormatWebArchive 14wdFormatXMLTemplate
1wdFormatTemplate97 6wdFormatRTF 10wdFormatFilteredHTML 15wdFormatXMLTemplateMacroEnabled
2wdFormatText 7wdFormatUnicodeText 11wdFormatXML 16wdFormatDocumentDefault

Size: filesize / filelength in bytes

23876
c_00 = FileLen(ThisWorkbook.FullName)
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).Size
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).Size
c_00 = Mid(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 14, 13)
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(6)
OpenThisWorkbook.FullName For Input As #1
c_00 = LOF(1)
Close

Word

c_00 =ThisDocument.BuiltinDocumentProperties(22)
c_00 =ThisDocument.BuiltinDocumentProperties("number of bytes")

Size: filesize in kbytes

23,8 kB
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 1)
End With

Size: filesize in Mbytes

Music file (mp3)
2,62 MB

With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(7)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Size: "),""),10)
End With

Image file

With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(4)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Size: "),""),10)
End With

Excel, Word file

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(ThisWorkbook.Name), -1),vblf)(2)
End With
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(ThisWorkbook.Name), -1),vblf),"Size: "),""),10)
End With

Attribute: VBA constant

32
c_00 = GetAttr(ThisWorkbook.FullName)
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).Attributes
0vbNormal 1vbReadOnly 2vbHidden 4vbSystem 8vbVolume 16vbDirectory 32vbArchive 64vbAlias

Attribute: character

A
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 6)
End With
NvbNormal RvbReadOnly HvbHidden SvbSystem VvbVolume DvbDirectory AvbArchive vbAlias

Attribute: readonly

True / False
c_00 =ThisWorkbook.ReadOnly

Date/time: file created

23-12-2012 14:08:17
c_00 =ThisWorkbook.BuiltinDocumentProperties(11)
c_00 =ThisWorkbook.BuiltinDocumentProperties("creation date")
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 4)
End With
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 31)
End With

Date/time: file last accessed

23-12-2012 14:08:17
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).datelastaccessed' dd-mm- yyyy
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).datecreated
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 5)
End With
c_00 = Mid(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &ThisWorkbook.FullName & Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 19, 15)

Excel, Word file

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(ThisWorkbook.Name), -1),vblf)(3)
End With
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(ThisWorkbook.Name), -1),vblf),"Last modified "),""),15)
End With

Date/time: last saved

23-12-2012 14:08:17
c_00 = FileDateTime(ThisWorkbook.FullName)
c_00 =ThisWorkbook.BuiltinDocumentProperties(12)
c_00 =ThisWorkbook.BuiltinDocumentProperties("last save time")
c_00 = CreateObject("scripting.filesystemobject").getfile(ThisWorkbook.FullName).datelastmodified
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).ModifyDate
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 3)
End With

Date/time: last printed

23-12-2012 14:08:17
c_00 =ThisWorkbook.BuiltinDocumentProperties(10)
c_00 =ThisWorkbook.BuiltinDocumentProperties("last printdate")

Link

True / False
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).IsLink

Browsable

True / False
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).IsBrowsable

File

True / False
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).IsFileSystem

Folder

True / False
c_00 = CreateObject("shell.application").namespace(ThisWorkbook.Path & "\").Items.Item(ThisWorkbook.Name).IsFolder

File exists

True / False
c_00 = Dir(ThisWorkbook.FullName)<>""
c_00 = CreateObject("scripting.filesystemobject").FileExists(ThisWorkbook.FullName)

Status

"On line"
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 7)
End With

Owner

"SNB-8PN11PL\snb"
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 8)
End With

Version

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 29)
End With

Program description

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 30)
End With

Description

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 36)
End With

File version

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 37)
End With

Product name

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 38)
End With

Product version

With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 39)
End With

Word, Excel, Powerpoint

Title

"Titel 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(1)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Title")
With CreateObject("shell.application").namespace (ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 10)
End With

Subject

"Onderwerp 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(2)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Subject")
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 11)
End With

Author

"Auteur 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(3)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Author")
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 9)
End With
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(Thisworkbook.Name), -1),vblf)(1)
End With
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(ThisWorkbook.Name), -1),vblf),"Auteur: "),""),9)
End With

Keywords

"Trefwoord 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(4)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Keywords")

comments

"Opmerking 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(5)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Comments")
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 14)
End With

Template

"normal.dot"
c_00 =ThisWorkbook.attachedTemplate
c_00 =ThisWorkbook.BuiltinDocumentProperties(6)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Template")

Last author

"Auteur 2"
c_00 =ThisWorkbook.BuiltinDocumentProperties(7)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Last Author")

Revision number

7
c_00 =ThisWorkbook.BuiltinDocumentProperties(8)
c_00 =ThisWorkbook.BuiltinDocumentProperties("Revision number")

Security

True / False
c_00 =ThisWorkbook.BuiltinDocumentProperties(17)
c_00 =ThisWorkbook.BuiltinDocumentProperties("security")

category

"Categorie 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(17)
c_00 =ThisWorkbook.BuiltinDocumentProperties("category")
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 12)
End With

Format

c_00 =ThisWorkbook.BuiltinDocumentProperties(19)
c_00 =ThisWorkbook.BuiltinDocumentProperties("format")

Manager

"Manager 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(20)
c_00 =ThisWorkbook.BuiltinDocumentProperties("manager")

company

"Bedrijf 1"
c_00 =ThisWorkbook.BuiltinDocumentProperties(21)
c_00 =ThisWorkbook.BuiltinDocumentProperties("company")
With CreateObject("shell.application").namespace(ThisWorkbook.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisWorkbook.Name), 35)
End With

Hyperlink base

"E:\OF\"
c_00 =ThisWorkbook.BuiltinDocumentProperties(29)
c_00 =ThisWorkbook.BuiltinDocumentProperties("hyperlink base")

Word, Powerpoint files

Total editing time

04:12:47
c_00 =ThisDocument.BuiltinDocumentProperties(13)
c_00 =ThisDocument.BuiltinDocumentProperties("total editing time")

Number of Paragraphs

94
c_00 =ThisDocument.Paragraphs.Count
c_00 =ThisDocument.BuiltinDocumentProperties(24)
c_00 =ThisDocument.BuiltinDocumentProperties("number of paragraphs")

Number of Words

1356
c_00 =ThisDocument.Words.Count
c_00 =ThisDocument.BuiltinDocumentProperties(15)
c_00 =ThisDocument.BuiltinDocumentProperties("number of words")

Word files

Number of Pages

17
c_00 =ThisDocument.BuiltinDocumentProperties(14)
c_00 =ThisDocument.BuiltinDocumentProperties("number of pages")

With CreateObject("shell.application").namespace(ThisDocument.Path & "\")
c_00 = .getdetailsof(.Items.Item(ThisDocument.Name), 13)
End With

Number of Lines

130
c_00 =ThisDocument.Sentences.Count
c_00 =ThisDocument.BuiltinDocumentProperties(23)
c_00 =ThisDocument.BuiltinDocumentProperties("number of lines")

Number of Characters

4503
c_00 =ThisDocument.Characters.Count
c_00 =ThisDocument.BuiltinDocumentProperties(16)
c_00 =ThisDocument.BuiltinDocumentProperties("number of characters")

Number of Characters; Spaces included

5312
c_00 =ThisDocument.BuiltinDocumentProperties(30)
c_00 =ThisDocument.BuiltinDocumentProperties("Number of characters with spaces")

Powerpoint files

Number of Slides

34
c_00 =ActivePresentation.BuiltinDocumentProperties(25)
c_00 =ActivePresentation.BuiltinDocumentProperties("number of slides")

Number of Notes

17
c_00 =ActivePresentation.BuiltinDocumentProperties(26)
c_00 =ActivePresentation.BuiltinDocumentProperties("number of notes")

Number of hidden Slides

4
c_00 =ActivePresentation.BuiltinDocumentProperties(27)
c_00 =ActivePresentation.BuiltinDocumentProperties("number of hidden slides")

Number of multimediaclips

2
c_00 =ActivePresentation.BuiltinDocumentProperties(28)
c_00 =ActivePresentation.BuiltinDocumentProperties("number of mediaclips")

Music files

copyright

With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 15)
End With

Artist

"Orchestra of the Age of Enlightenment - Harry Bicket, Lorraine Hunt Lieberson"
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 16)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(0)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Artist: "),""),9)
End With

Album Title

"Handel Arias, Stephen Stubbs - Lute,guit., Carrai-cello, Tendemans- Gamba"
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 17)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(1)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Album Title: "),""),14)
End With

Year

2002
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 18)
End With

Track Number

11
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 19)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(2)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Track Number: "),""),15)
End With

Genre

"Opera"
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 20)
End With

Duration

00:05:33
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 21)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(3)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Duration: "),""),11)
End With

Bit Rate

"128kbps"
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 22)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(5)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Bit Rate: "),""),11)
End With

Protected

"Yes /No"
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 23)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(6)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Protected: "),""),12)
End With

Audio Sample Size

0 bits
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 32)
End With

Sample Rate

44 kHz
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 33)
End With

channels

1 (mono), 2 (stereo), 4 (quad)
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 34)
End With

Image files

camera Model

DMC-FS11
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 24)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(2)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Camera Model: "),""),15)
End With

Date Picture taken

27-05-2011 12:29
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 25)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(1)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Date Picture taken: "),""),21)
End With

Dimensions

4320 x 3240
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 26)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = split(.getdetailsof(.Items.Item(***.Name), -1),vblf)(0)
End With
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item(***.Name), -1),vblf),"Dimensions: "),""),12)
End With

Pixels horizontally

4320
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 27)
End With

Pixels vertically

3240
With CreateObject("shell.application").namespace(***.Path & "\")
c_00 = .getdetailsof(.Items.Item(***.Name), 28)
End With

II Properties: closed file

Name: fullname; drive + path + name + extension

"E:\OF\example.xls"
c_00 = CreateObject("scripting.filesystemobject").GetAbsolutePathname("E:\OF\example.xls")
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").Path
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").Path

Name: name including extension

"example.xls"
c_00 =Dir("E:\OF\example.xls"))
c_00 = CreateObject("scripting.filesystemobject").GetFileName("E:\OF\example.xls")
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").Name
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").Name
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 0)
End With
c_00 = Mid(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 45)

Name: name without extension

"example"
c_00 = CreateObject("scripting.filesystemobject").GetBaseName("E:\OF\example.xls")

Name: extension

"xls"
c_00 = CreateObject("scripting.filesystemobject").GetExtensionName("E:\OF\example.xls")

DOS - name

"VOORBE~1.XLS"
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").shortname
c_00 = Left(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 12)

DOS - fullname

"E:\OF\VOORBE~1.XLS"
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").shortpath

Path: fullpath without slash, unless in rootdirectory

"E:\OF"
c_00 = CreateObject("scripting.filesystemobject").GetParentFolderName("E:\OF\example.xls")
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").parentfolder

Path: foldername without path

"OF"
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").Parent

Drive: drivename

"GEGEVENS ."
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(1)

Drive: drivenumber

"4FB9-3D9B"
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(2)

Drive: drive character + :

"E:"
c_00 = CreateObject("scripting.filesystemobject").GetDriveName("E:\OF\example.xls")
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").drive
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(3)

Drive: free space in file containing drive

"465. (..) bytes"
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(7)

Type

"Microsoft Excel worksheet"
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").Type
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").Type
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.xls"), -1),vblf)(0)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.xls"), -1),vblf),"Type: "),""),7)
End With

Music file (mp3)

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(4)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Type: "),""),7)
End With

Image file

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf)(3)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf),"Type: "),""),7)
End With

Size: filesize / filelength in bytes

23876
c_00 = FileLen("E:\OF\example.xls")
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").Size
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").Size
c_00 = Mid(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 14, 13)
c_00 = Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(6)
Open"E:\OF\example.xls"For Input As #1
c_00 = LOF(1)
Close

Size: filesize in kbytes

23,8 kB
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 1)
End With

Size: filesize in Mbytes

2,62 MB

Music file (mp3)

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(7)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Size: "),""),10)
End With

Image file

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf)(4)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf),"Size: "),""),10)
End With

Excel, Word file

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.xls"), -1),vblf)(2)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.xls"), -1),vblf),"Size: "),""),10)
End With

Attribute: VBA constant

32
c_00 = GetAttr("E:\OF\example.xls")
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").Attributes ' nummer archive
0vbNormal 1vbReadOnly 2vbHidden 4vbSystem 8vbVolume 16vbDirectory 32vbArchive 64vbAlias

Attribute: charachter

A
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 6)
End With
NvbNormal RvbReadOnly HvbHidden SvbSystem VvbVolume DvbDirectory AvbArchive vbAlias

Date/time: file created

23-12-2012 14:08:17
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 4)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 31)
End With

Date/time: file last acccessed

23-12-2012 14:08:17
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").datelastaccessed' dd-mm- yyyy
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").datecreated
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 5)
End With
c_00 = Mid(Split(CreateObject("wscript.shell").Exec("cmd /c Dir " & Chr(34) &"E:\OF\example.xls"& Chr(34) & " /b").StdOut.ReadAll, vbCrLf)(5), 19, 15)

Excel, Word file

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.xls"), -1),vblf)(3)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.xls"), -1),vblf),"Gewijzigd op: "),""),15)
End With

Date/time: last modified

23-12-2012 14:08:17
c_00 = FileDateTime("E:\OF\example.xls")
c_00 = CreateObject("scripting.filesystemobject").getfile("E:\OF\example.xls").datelastmodified
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").ModifyDate
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 3)
dd-mm-yyyy hh:mm
End With

Link

True / False
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").IsLink

Browsable

True / False
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").IsBrowsable

File

True / False
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").IsFileSystem

Folder

True / False
c_00 = CreateObject("shell.application").namespace("E:\OF\").Items.Item("example.xls").IsFolder

File exists

True / False
c_00 = Dir("E:\OF\example.xls")<>""
c_00 = CreateObject("scripting.filesystemobject").FileExists("E:\OF\example.xls")

Status

"On line"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 7)
End With

Owner

"SNB-8PN11PL\snb"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 8)
End With

Version

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 29)
End With

Program description

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 30)
End With

Description

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 36)
End With

File version

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 37)
End With

Productname

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 38)
End With

Productversion

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 39)
End With

Word, Excel, Powerpoint

Title

"Titel 1"
createObject("shell.application").namespace ("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 10)
End With

Subject

"Onderwerp 1"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 11)
End With

Author

"Auteur 1"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 9)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.xls"), -1),vblf)(1)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.xls"), -1),vblf),"Auteur: "),""),9)
End With

comments

"Opmerking 1"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 14)
End With

category

"Categorie 1"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 12)
End With

company

"Bedrijf 1"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 35)
End With

Word file

Number of Pages

17
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.doc"), 13)
End With

Music file

copyright

With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 15)
End With

Artist

"Orchestra of the Age of Enlightenment - Harry Bicket, Lorraine Hunt Lieberson"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 16)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(0)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Artist: "),""),9)
End With

Album Title

"Handel Arias, Stephen Stubbs - Lute,guit., Carrai-cello, Tendemans- Gamba"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 17)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(1)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Album Title: "),""),14)
End With

Year

2002
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 18)
End With

Track Number

11
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 19)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(2)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Track Number: "),""),15)
End With

Genre

"Opera"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 20)
End With

Duration

00:05:33
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 21)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(3)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Duration: "),""),11)
End With

Bit Rate

"128kbps"
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 22)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(5)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Bit Rate: "),""),11)
End With

Protected

Yes /No
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.xls"), 23)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf)(6)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.mp3"), -1),vblf),"Protected: "),""),12)
End With

Audio Sample Size

0 bits
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 32)
End With

Sample Rate

44 kHz
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 33)
End With

channels

1 (mono), 2 (stereo), 4 (quad)
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.mp3"), 34)
End With

Image file

camera Model

DMC-FS11
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.jpg"), 24)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf)(2)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf),"Camera Model: "),""),15)
End With

Date Picture Taken

27-05-2011 12:29
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.jpg"), 25)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf)(1)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf),"Dat Picture Taken: "),""),24)
End With

Size

4320 x 3240
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.jpg"), 26)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf)(0)
End With
With CreateObject("shell.application").namespace("E:\OF\")
c_00 =mid(join(filter(split(.getdetailsof(.Items.Item("example.jpg"), -1),vblf),"Dimensions: "),""),12)
End With

Pixels horizontally

4320
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.jpg"), 27)
End With

Pixels vertically

3240
With CreateObject("shell.application").namespace("E:\OF\")
c_00 = .getdetailsof(.Items.Item("example.jpg"), 28)
End With

Method: copy file

copy open file

ThisWorkbook.SaveCopyAs"G:\example.xls"
ThisWorkbook.SaveAs"G:\example.xls"
ThisWorkbook.Sheets(1).Copy
ActiveWorkbook.SaveAs"G:\example.xls"
ActiveWorkbook.Close 0
createObject("scripting.filesystemobject").CopyFileThisWorkbook.FullName,"G:\example.xls"
createObject("shell.application").NameSpace("G:\").CopyHereThisWorkbook.FullName
Shell "cmd /c copy " & ThisWorkbook.FullName &"G:\example.xls"

copy 1 closed file

Workbooks.Add("E:\OF\example.xls").SaveAs"E:\OF\kopie van example.xls"
createObject("Excel.Application").Workbooks.Add("E:\OF\example.xls").SaveAs"E:\OF\kopie van example.xls"
Filecopy"G:\OF\example.xls","G:\example.xls"
createObject("scripting.filesystemobject").CopyFile"G:\OF\example.xls","G:\example.xls"
createObject("scripting.filesystemobject").GetFile("G:\OF\example.xls").Copy"G:\example.xls"
createObject("shell.application").NameSpace("G:\").CopyHere"G:\OF\example.xls"
shell "cmd /c copy"G:\OF\example.xls G:\example.xls"
createObject("wscript.shell").Run "cmd /c copy"G:\OF\example.xls G:\example.xls"
createObject("wscript.shell").Exec "cmd /c copy"G:\OF\example.xls G:\example.xls"

copy several closed files

CreateObject("scripting.filesystemobject").CopyFile"G:\OF\*.xls","G:\"
createObject("shell.application").NameSpace("G:\").CopyHere"G:\OF\*.xls"
Shell "cmd /c copyG:\OF\*.xls G:\"

Method: move file

Move open file

ThisWorkbook.SaveAs"G:\nieuw\example.xls"

Move 1 closed file to another folder

Name"G:\OF\example.xls"As"G:\example.xls"
createObject("scripting.filesystemobject").MoveFile"G:\OF\example.xls","G:\example.xls"
createObject("scripting.filesystemobject").getfile("G:\OF\example.xls").Move"G:\example.xls"
createObject("shell.application").NameSpace("G:\").MoveHere"G:\nieuw\example.xls"

Move several closed files to another folder

CreateObject("scripting.filesystemobject").getfile("G:\OF\*.xls").Move"G:\"
createObject("shell.application").NameSpace("G:\").MoveHere"G:\OF\*.xls"

Move 1 closed file in the same folder

shell "cmd /c ren"G:\OF\example.xls example_001.xls"
createObject("wscript.shell").Run "cmd /c ren"G:\OF\example.xls example_001.xls"
createObject("wscript.shell").Exec "cmd /c ren"G:\OF\example.xls example_001.xls"

Move several closed files in the same folder

shell "cmd /c ren"G:\OF\example*.xls example_*.xls"
createObject("wscript.shell").Run "cmd /c ren"G:\OF\example*.xls example_*.xls"
createObject("wscript.shell").Exec "cmd /c ren"G:\OF\example*.xls example_*.xls"

Method: delete/remove file

Delete 1 closed file

Kill"G:\OF\example.xls"
Application.Recentfiles(1).delete
createObject("scripting.filesystemobject").DeleteFile"G:\OF\example.xls"
createObject("scripting.filesystemobject").getfile("G:\OF\example.xls").Delete
shell "cmd /c delG:\OF\example.xls"
createobject("wsript.shell").Run "cmd /c delG:\OF\example.xls"
createobject("wsript.shell").Exec "cmd /c delG:\OF\example.xls"
With New Shell
With .NameSpace("E:\OF\").Items.Item("example.xls")
For j = 1 To .Verbs.Count
If .Verbs.Item(j).Name = "Verwijderen" Then Exit For
Next
.InvokeVerb .Verbs.Item(j).Name
End With
End With

Delete several closed files

Kill"G:\OF\*.xls"
createObject("scripting.filesystemobject").DeleteFile"G:\OF\*.xls"
shell "cmd /c delG:\nieuw\*.xls"
createobject("wscript.shell").Run "cmd /c delG:\OF\*.xls"
createobject("wscript.shell").Exec "cmd /c delG:\OF\*.xls"

Method: new Excel file

New visible Excel file in existing Excel instance

workbooks.add
GetObject(,"Excel.Application").Workbooks.Add()windows(1).visible=true

New invisible Excel file in existing Excel-instantie

workbooks.add().windows(1).visible=false
GetObject(,"Excel.Application").Workbooks.Add

New invisible Excel file in new Excel instance

createObject("Excel.Application").Workbooks.Add
GetObject("","Excel.Application").Workbooks.Add

Method: new Word file

New visible Word file in existing Word instance

Documents.Add
GetObject(,"Word.Application").Documents.Add
With GetObject("", "Word.document")
.Activate
End With

New invisible Word file in existing Word instance

Documents.Add.Windows(1).Visible = False
GetObject(, "Word.Application").Documents.Add.Windows(1).Visible = False

New invisible Word file in new Word instance

CreateObject("Word.Aplication").Documents.Add
GetObject("", "Word.Application").Documents.Add
createObject("Word.Document")

Method: new TXT/CSV file

Nieuw TXT/CSV file

Open"G:\OF\example.txt"for output As #1
Print #1,"nieuwe tekst"
Close #1
createobject("scripting.filesystemobject").createtextfile("G:\OF\example.txt").write "nieuwe tekst"