Link to home
Create AccountLog in
Avatar of BISCO3
BISCO3

asked on

How do I add attachments to a new Outlook Mail Message - using Process.Start("mailto")

Is there a way to add attachments using the Process.Start feature???
The new mail message comes up with everything other than the attachment.(To, CC, Subject & Body)

This is the code I tried using:
            Dim StrBuilder As New StringBuilder

            With StrBuilder
                .Append("mailto:junior2124@msn.com")
                .Append("&cc=escemi@msn.com")
                .Append("&subject=Database Files")
                .Append("&body=Test")
                .Append("&attachments=C:\Users\escemi\Test.txt")
            End With

            Process.Start(StrBuilder.ToString)
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Use the /a switch and specify the files.
Also try the following method

mailto:iudith.m@zim.co.il?subject=my report&body=see attachment&attachment="\\myhost\myfolder\myfile.lis"
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer