How to open Outlook “New mail message” window from VB.NET

前端 未结 3 1552
逝去的感伤
逝去的感伤 2021-01-03 06:30

I\'ve a scenario in which user can make a selection from a grid (having uploaded files on local folder) and when user press \"send\", application should open Outlook \"New m

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-03 07:10

    If you want specifically want an outlook message and you want more options on what to send (body text, attachments, BCC, etc.):

    Dim Outl As Object
    Outl = CreateObject("Outlook.Application")
    If Outl IsNot Nothing Then
        Dim omsg As Object
        omsg = Outl.CreateItem(0) '=Outlook.OlItemType.olMailItem'
        'set message properties here...'
        omsg.Display(True) 'will display message to user
    End If
    

提交回复
热议问题