Hi all,
We are trying to send an Email using (Send Outlook Mail Message) however we want to attach one PDF file in a file with Thousands of other PDFs
How do we only select the file we wish to attach
Hi all,
We are trying to send an Email using (Send Outlook Mail Message) however we want to attach one PDF file in a file with Thousands of other PDFs
How do we only select the file we wish to attach
use FOR each.
item in directory.GetFiles(“your path name”)
use if condition
Path.GetExtension(item).Contains(“your pdf name”)
Hi there …
sorry i though you were seaching for pdf files from other files
use FOR each.
item in directory.GetFiles(“your path name”)
use if condition
(item).Contains(“your pdf name with extension”)
or
path.getfilename(item).contains(“your pdf name with extension”)
You can do like this:
MyFiles = Directory.GetFiles(“c:\myfolder”, “PDF Extract*”)
And in Send OutLook Mail Message in AttachmentsCollection you put the result of MyFiles variable.