Reading Properties from Closed Files (Office and PDF)


Joined
Nov 19, 2017
Messages
2
Reaction score
0
A similar problem was posted some time ago (now in archive) relating to Excel 2003 but did not receive a reply.

I have exactly the same problem with Excel 2013 (32 bit) running on Windows 10 (64 bit) and I am hoping someone can help this time.

I am trying to read the propereties of closed files. I have downloaded the modDocumentProperties.bas file from Chip Pearson's site (http://www.cpearson.com/excel/DocProp.aspx) and imported it to my trial project. I have selected the DSO OLE Document Properties Reader 2.1 reference and installed the DSOFile DLL. The DSOFile demo works as expected on both Office files and pdf files.
Calling the function directly from the worksheet, loaded with the filename(including the path), the property name and set (built in, custom, both) but it always returns #NAME?
Calling the function from a macro gives the result shown in the screenshot attached.

I have to confess to being completely out of my depth and consiquently am not sure what questions to ask. I have whiled away a few happy hours (not) searching the web but cannot find enough to get to a point where trial and error works. I suspect the answer is simple and I am a right dumbo for not knowing it but for the life of me I cannot find an answer.

Can anybody help please?
 

Attachments

  • !Excel Object Properties 1.JPG
    !Excel Object Properties 1.JPG
    50.7 KB · Views: 153
Ad

Advertisements

Joined
Nov 19, 2017
Messages
2
Reaction score
0
I am not sure what my expectations should be as I am a newcomer to this forum but I am sure I should have had a response by now; is my query on the too hard heap or is it too stupid to warrant a reply!!?

I have been trying alternatives and now have too Excel workbooks containing identical code. It works in one workbook but the other gives the error shown in the previous download so I suspect it is an issue with the environment in which the code is running.

There are other modules in each workbook but I cannot see how they affect the error.

If there is anybody sufficiently interested in helping a quick response would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top