VB 中用代码打开 Outlook 发Mail

来源:互联网 发布:短信恢复软件免费版 编辑:程序博客网 时间:2024/06/05 18:09

Private   Declare   Function   ShellExecute   Lib   "shell32.dll"   Alias   "ShellExecuteA"   (ByVal   hwnd   As   Long,   ByVal   lpOperation   As   String,   ByVal   lpFile   As   String,   ByVal   lpParameters   As   String,   ByVal   lpDirectory   As   String,   ByVal   nShowCmd   As   Long)   As   Long  

 

  Const   SW_SHOWNORMAL   =   1  

  Private   Sub   Form_Load()  

          'Send   an   E-Mail   to   the   KPD-Team  

          ShellExecute   Me.hwnd,   vbNullString,   "mailto:ygyuan@elong.com",   VBNullString,   "C:/",   SW_SHOWNORMAL  

  End   Sub  

 

 

Call   ShellExecute(Me.hwnd,   "open",   _  
                          "mailto:omeName@Somewhere.com?subject=MySubject&Attach   =   ""c:/Mvp_form.doc""   ",   _  
          vbNullString,   vbNullString,   SW_SHOW)  

原创粉丝点击