08-05-2014, 03:20 PM
Hello,
I am working on shortening the process of attached specific files to emails that I send on a regular basis. In my job I run quotes and then email those quotes to the person requesting them. I already automate quite a bit of the process of creating these emails but one thing that I haven't been able to automate yet is attaching the unique quotes I just generated to the email that I am sending to the person who requested them. I found the code below as I have been searching the forum for some example of searching for a specific file and I was hoping I could adjust it to do what I am looking for.
I know this code was generated to delete a file as you can see I want to change to attached the quote(s) that I generate to my email. The copy I have at the top of the code is the term I would like to search in the folder "2014". All of the quotes that are run follow the following naming convention between the brackets [MM-DD CLIENT LAST NAME - ADVISOR LAST NAME -] i.e. [08-05 Smith - Johnson -]. All of the quotes are also PDF files it that helps as well. Lastly, there are generally at least 2 PDFs that need to be attached that follow the naming convention and sometime as many 8 PDFs that need to be attached. I really appreciate any help you can give me on this.
Thank You,
Paul
I am working on shortening the process of attached specific files to emails that I send on a regular basis. In my job I run quotes and then email those quotes to the person requesting them. I already automate quite a bit of the process of creating these emails but one thing that I haven't been able to automate yet is attaching the unique quotes I just generated to the email that I am sending to the person who requested them. I found the code below as I have been searching the forum for some example of searching for a specific file and I was hoping I could adjust it to do what I am looking for.
'Cc
str s.getclip
str myFolder.expandpath("J:\Quotes\2014")
str myFile.from(myFolder F"{s}")
ARRAY(str) a; int i
GetFilesInFolder a myFolder
for i 0 a.len
,;out a[i]
,if(a[i]~myFile)
,,del- myFile; err
I know this code was generated to delete a file as you can see I want to change to attached the quote(s) that I generate to my email. The copy I have at the top of the code is the term I would like to search in the folder "2014". All of the quotes that are run follow the following naming convention between the brackets [MM-DD CLIENT LAST NAME - ADVISOR LAST NAME -] i.e. [08-05 Smith - Johnson -]. All of the quotes are also PDF files it that helps as well. Lastly, there are generally at least 2 PDFs that need to be attached that follow the naming convention and sometime as many 8 PDFs that need to be attached. I really appreciate any help you can give me on this.
Thank You,
Paul