Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use windows file properties to be linked to Access table fields

Status
Not open for further replies.
Mar 30, 2005
25
US
hi,

what I'm tring to do is enter data into Windows File Properties (right click on on file, in Summary)(Ex. title,subject, comments) and have that file's data be linked to the record in my table(in access 2000) and update itself and be able to show the info on my forms. For example the fields names would be title,subject, comments in my table.

Hope I explained it well, someone please help.

Thanks,
John
 
Check out the File Scripting Object (FSO) library on the type of information that can be retrieved on a file.

Set a reference to the Microsoft runtime scripting library and look at the different methods and properties.

 
A starting point:
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace("\path\to\folder")
Set objFolderItem = objFolder.ParseName("FileName.Ext")
On Error Resume Next
strTitle = Trim(objFolder.GetDetailsOf(objFolderItem, 10))
strSubject = Trim(objFolder.GetDetailsOf(objFolderItem, 11))
strComments = Trim(objFolder.GetDetailsOf(objFolderItem, 14))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
hi, PHV

I'm pretty new to the field and not highly skilled at coding. Where would your code be placed? (form load?)

and you said your code was a starting point - If i only wanted to only pull title, subject, and comments, would that be all the code for it?

Thank you for all your time, im straight out of college and trying to learn as much as i can.

-John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top