Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Built-in Functions _ Split Function This There Away To Find The Number Of Splits?

Posted by: InfoHound Nov 16 2019, 02:33 PM

I'm using a variant (varFilePaths) to store the file paths of files a user selects from a file picker.
I want to attach each file to an Outlook email. If I can tell how many files are contained in the string varFilePaths then I could use a for next statement to attach each file to the email. Is there a way to do this?

Thanks


Posted by: theDBguy Nov 16 2019, 03:31 PM

Hi about?

NoOfFiles = Ubound(SplitArrayName)-1

Posted by: MadPiet Nov 16 2019, 03:36 PM

For a = LBound(arrayX()) to UBound(ArrayX())
olkMsg.Attachments.Add(arrayX(a))
Next a

Posted by: InfoHound Nov 17 2019, 05:27 AM

Thanks guys those ideas worked perfect!

Posted by: theDBguy Nov 17 2019, 08:41 AM

You're welcome. Good luck with your project.