When you want to send all attachments that are in a folder, you'll need to loop through the attachments in the function to add them to one message. To = "Hi " & olMsg.To & ", I have attached " & fName & " as you requested." If you need a record of the files sent, press Ctrl+G to open the Immediate window in the VBA Editor to view the list created by Debug.Print fName.įunction SendasAttachment(fName As String) Change fldName to use the correct path then run the macro. To use this macro, open the VBA editor, add a new module and paste the code into it. It also lists the file names in the Immediate window, if you want to review and confirm each file was processed and sent. When it's finished, a dialog box tells you how many files were sent. " Embed Images in New Messages using a Macro"
0 Comments
Leave a Reply. |