Forum Discussion

hrh_dash's avatar
hrh_dash
Iron Contributor
Jun 21, 2022

Convert pdf files to word via VBA based on 2 conditions

I would like to convert pdf files to text using the dir function based on 2 criteria:

 

1. file string would need to include "T16GB0004K"

2. file dated should be within 3 months of Today's date

 

The code below was popping out an error, therefore how should i go about this?

 

Dim FolderPath as String

FolderPath = "C:\Users\hrhquek\Desktop\Past OPPTY"

path = FolderPath & "\*.pdf" & "T16GB0004K*"

 

 

Resources