如何打开Outlook [新增邮件"从VB.NET窗口窗口、邮件、Outlook、QUOT

2023-09-04 00:09:21 作者:空巷

我有一个场景,用户可以选择从一个网格(具有本地文件夹上传的文件),并且当用户preSS发送,应用程序应该打开Outlook的新邮件窗口,在选择文件作为附件(其中用户从电网选择)。

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 mail message" window having selected files as attachments (which user selected from grid).

任何帮助将AP preciated。

Any help will be appreciated.

推荐答案

如果您想特别希望Outlook邮件,你想在送什么更多的选择(正文,附件,BCC等):

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