I Need the SystemEmail "Attachment" Command format to include multiple files in one email?
The Code I am using in Windows 7 and the Windows Live Mail, allows me to attach one file to the email, but I cannot figure out how to attach Multiple files.
The Code to attach one file that works is:
eMessage.setAttachement(Array(convertToUrl(sPath & "1.pdf")))
I have tried several variants of &, comas, semicolons, nested Array(convertUrl(...) but when I run the macro, nothing works.
eMessage.setAttachement(Array(convertToUrl(sPath & "1.pdf; " & sPath & "2.pdf; " & sPath & "3.pdf")))
[Solved] SysEmail "Attachment" Cmd to include multiple files
[Solved] SysEmail "Attachment" Cmd to include multiple files
Last edited by alf50 on Sat Feb 26, 2011 9:50 pm, edited 1 time in total.
OpenOffice 4.1.14 on Mac Catalina(10.15.7), RasPi4B (TwisterOS-8/2023update) & MS Wnds10
Re: Need SystemEmail "Attachment" Command to include multipl
The method setAttachment takes an array of URL's as its argument. If you want to do it in one line, I think what you need is
It is probably cleaner to do it in multiple lines
I didn't actually test the code. I hope there are no typos or silly mistakes.
Code: Select all
eMessage.setAttachement(Array(convertToUrl(sPath & "1.pdf"), convertToURL(sPath & "2.pdf"), convertToURL(sPath & "3.pdf")))
Code: Select all
URL1 = convertToUrl(sPath & "1.pdf")
URL2 = convertToUrl(sPath & "2.pdf")
URL3 = convertToUrl(sPath & "3.pdf")
ArrayOfURL = Array(URL1, URL2, URL3)
eMessage.setAttachement(ArrayOfURL)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.