If you right click on a .pdf file, on the "summary" tab there is a property
called "keywords". Is it possible to programmatically read the contents of
the keywords property using VBA?
I want to loop through a bunch of directories looking for pdfs that have
"foobar" in the keywords property.
Thanks,
Paul 4 14360
"Paul H" <no****@nospam.com> wrote in message
news:hH******************@newsfe6-win.ntli.net... If you right click on a .pdf file, on the "summary" tab there is a property called "keywords". Is it possible to programmatically read the contents of the keywords property using VBA?
You would need to visit Adobe's site, and see what, if any, Application
Programming Interfaces (APIs) the Adobe Acrobat Reader exposes. Access can
interface with many software packages which expose APIs. If they do not,
then you'll need to Google for details on the PDF file format to determine
whether this information is in usable form if you use VBA File I/O to read
the binary information.
Larry Linson
Microsoft Access MVP
"Larry Linson" <bo*****@localhost.not> wrote in message
news:uG7Ef.1832$6d.494@trnddc06... "Paul H" <no****@nospam.com> wrote in message news:hH******************@newsfe6-win.ntli.net... If you right click on a .pdf file, on the "summary" tab there is a property called "keywords". Is it possible to programmatically read the contents of the keywords property using VBA?
You would need to visit Adobe's site, and see what, if any, Application Programming Interfaces (APIs) the Adobe Acrobat Reader exposes. Access can interface with many software packages which expose APIs. If they do not, then you'll need to Google for details on the PDF file format to determine whether this information is in usable form if you use VBA File I/O to read the binary information.
Larry Linson Microsoft Access MVP
Many thanks Larry,
I have been trawling the web for hours looking for an answer to this, then
it occurred to me; the "summary" tab is available to a wide variety of file
types (.mdb, .doc, .jpg, .txt). So there must be a common interface to get
at it, it must be something that is already part of the OS, right?
I have been messing about with Scripting.FileSystemObject and not really
getting anywhere. ( I assume that is what you meant)
This is really bugging me now, I've already said "Yea, shouldn't be a
problem" to the client. Gulp!
If you have any more ideas, I'd be very grateful.
Paul
"Paul H" <no****@nospam.com> wrote I have been trawling the web for hours looking for an answer to this, then it occurred to me; the "summary" tab is available to a wide variety of file types (.mdb, .doc, .jpg, .txt). So there must be a common interface to get at it, it must be something that is already part of the OS, right?
Very likely, though I am not familiar with that.
I have been messing about with Scripting.FileSystemObject and not really getting anywhere. ( I assume that is what you meant)
No, that is not what I meant. I don't use the FSO because many System
Administrators uninstall the Scripting Host because of security concerns,
hunt down and eliminate "rogue" programs that try to reinstall it, etc.
Access VBA and classic VB have very nice, very effective File I/O commands
built in. See the Open Statement, Close Statement, Read Statement, Write
Statement, Input # Statement, and Print # Statements. You can read any file
as binary, which may be exactly what you need to get at the information.
This is really bugging me now, I've already said "Yea, shouldn't be a problem" to the client. Gulp!
If you have any more ideas, I'd be very grateful.
Visit http://www.mvps.org and find some VB MVP's sites. There was much more
documentation of Windows API use for classic VB (through VB 6.0) than you
will find for Access. Since the same DLL (the most recent is VBA6.DLL, if
memory serves) almost all the API information for VB works for VBA, too.
Larry Linson
Microsoft Access MVP
"Larry Linson" <bo*****@localhost.not> wrote in message
news:Q6rEf.2152$6d.781@trnddc06... "Paul H" <no****@nospam.com> wrote
I have been trawling the web for hours looking for an answer to this, then it occurred to me; the "summary" tab is available to a wide variety of file types (.mdb, .doc, .jpg, .txt). So there must be a common interface to get at it, it must be something that is already part of the OS, right?
Very likely, though I am not familiar with that.
I have been messing about with Scripting.FileSystemObject and not really getting anywhere. ( I assume that is what you meant)
No, that is not what I meant. I don't use the FSO because many System Administrators uninstall the Scripting Host because of security concerns, hunt down and eliminate "rogue" programs that try to reinstall it, etc. Access VBA and classic VB have very nice, very effective File I/O commands built in. See the Open Statement, Close Statement, Read Statement, Write Statement, Input # Statement, and Print # Statements. You can read any file as binary, which may be exactly what you need to get at the information.
This is really bugging me now, I've already said "Yea, shouldn't be a problem" to the client. Gulp!
If you have any more ideas, I'd be very grateful.
Visit http://www.mvps.org and find some VB MVP's sites. There was much more documentation of Windows API use for classic VB (through VB 6.0) than you will find for Access. Since the same DLL (the most recent is VBA6.DLL, if memory serves) almost all the API information for VB works for VBA, too.
Larry Linson Microsoft Access MVP
I found it! I stumbled across a VB forum and found the following code. I am
posting here for anyone else who might need it. After a few tweaks I can get
it to do what I want.
Thanks for your time Larry.
**code start****
Public Function SetSummaryInfo()
Dim arrHeaders(41)
Dim objShell, objFolder, i, strFileName
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace("C:\test")
For i = 0 To 41
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
Next
For Each strFileName In objFolder.Items
For i = 0 To 41
Debug.Print i & vbTab & arrHeaders(i) & ": " &
objFolder.GetDetailsOf(strFileName, i)
Next
Exit For
Next
End Function
**code end**** This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Hans Kamp |
last post by:
My program fails reading XML attributes. A fragment of the code is:
private void showXmlNodeAtTreeNode(XmlNodeList xnl, TreeNode tn)
{
int i;
for (i = 0; i < xnl.Count; i++)
{
XmlNode xn =...
|
by: Ram Baruch |
last post by:
Hi,
Does somebody know how to obtain the file attributes of a file that is on a
website? Specifically, I need to know when it was
created.
For example, this file:...
|
by: John R. |
last post by:
How do you set the following file attributes:
Compressed
Encrypted
Normal
ReparsePoint
SparsePoint
You CAN'T set these using FileInfo.Attributes or File.SetAttributes. It
doesn't work for...
|
by: Pete Kane |
last post by:
Hello all, how can I check for multiple file attributes using bitwise
operators ? I'm thinking along the lines of
string fname = "c:\\test.txt";
if(File.GetAttributes(fname) &...
|
by: JH |
last post by:
I am scanning selected drives and computers and capture all files and their
attributes. I am using the scripting file system object. It takes a long
time to collect the attributes. Is there a...
|
by: JH |
last post by:
I can get file attributes such as Name, LastAccessTime, Length etc using
system.IO.Directory.GetDirectories
and other related procedures. But how can I get the file owner ?
Thanks
|
by: sunilpgt |
last post by:
hi,
i am confused to write a code for setting some file attributes.in
such a way that if we disable copy&paste option for a text file it
shouldn't be copied? At that instant there should come a...
|
by: Kenta |
last post by:
I am using an instance of DirectoryInfo to browse and retrive the files and some file attributes on a physical directory. This is displayed in a html table. But if you have for example text files...
|
by: Extemp |
last post by:
I want to be able to read + edit file attributes with python. Is this possible?
For instance, I have a file, Tetris Remix.mp3
Could I change it's title, or album, etc with python code?
I'm using...
|
by: Coldfire |
last post by:
Hi,
The strange problem i am having is,
the input element of type='file' not reading file names after 20 file elements. It simple returns null on reading the 'name' of file.
The code is...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |