VBA to get files and edit their meta data

RPM7

Board Regular
Joined
Nov 28, 2007
Messages
191
Is there a way to create a list of files in a folder including subfolders and then display the title/description and Author?

I have to update the metadata in lots of pdf files and it's taking forever to do this manually.
I know there are ways to use VBA to get a list of files from a folder/subfolder, I just don't know if its possible to edit the meta data though.

Can this be done, and does anyone know how to do it?

Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
So the slightly tricky part is that the files you're dealing with are PDF files. They're not the easiest of files to deal with - it's not impossible, but it all depends on what it is that you want to do.
Is there a way to create a list of files in a folder including subfolders and then display the title/description and Author?
As for this part of the question, yes - it is easy to produce a list of files in a folder (including subfolders, and the files contained therein). You already note in your explanation that you know that are ways of doing it, but if you don't have any code to-hand, it's easy enough to find in this forum or online. But then you're asking two different things - here you say that you want to display the title, description and the author details, but in the next sentence you say that you actually want to edit the metadata.

Displaying the details (to the extent that the info is contained in the PDF file) is doable, though from memory it hasn't always been 100% reliable. I may be misremembering. As for editing the PDF metadata, though, I actually don't know of an easy way to do that off-the-top of my head without relying on a third-party library, such as Adobe. You could conceivably load the PDF file into Word, adjust the key properties, and then save that as a new PDF file, but it's a bit of hassle and it can throw off the formatting of the original PDF.

When you say you've been doing it manually, how have you been doing it? It may be the case that you have a license to PDF editing software already that VBA can automate.
 
Upvote 0

Forum statistics

Threads
1,216,089
Messages
6,128,760
Members
449,466
Latest member
Peter Juhnke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top