VB.net 调用OutLook发邮件(程序自动添加附件)
2011-11-07 21:38
288 查看
Dim rkey As Microsoft.Win32.RegistryKey
Dim path As String
Dim subject As String
Dim EmailTo As String
Dim AttachPath As String
rkey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(“mailto/shell/open/command”) ‘取得Outlook程序位置
If rkey IsNot Nothing Then
path = rkey.GetValue(“”).ToString() & ” “
path = path.Substring(0, path.IndexOf(” “))
path = path.Replace(“”"”, “”)
rkey.Close()
Try
subject = “hello”
EmailTo = “myfriend@hotmail.com“
AttachPath = “c:/sss.txt”
System.Diagnostics.Process.Start(path, “-c IPM.Note /m ” & EmailTo.Trim & “&subject=” & subject.Trim & ” ” & AttachPath.Trim)
Catch ex As Exception
End Try
End If
Dim path As String
Dim subject As String
Dim EmailTo As String
Dim AttachPath As String
rkey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(“mailto/shell/open/command”) ‘取得Outlook程序位置
If rkey IsNot Nothing Then
path = rkey.GetValue(“”).ToString() & ” “
path = path.Substring(0, path.IndexOf(” “))
path = path.Replace(“”"”, “”)
rkey.Close()
Try
subject = “hello”
EmailTo = “myfriend@hotmail.com“
AttachPath = “c:/sss.txt”
System.Diagnostics.Process.Start(path, “-c IPM.Note /m ” & EmailTo.Trim & “&subject=” & subject.Trim & ” ” & AttachPath.Trim)
Catch ex As Exception
End Try
End If
相关文章推荐
- VB.net 调用OutLook发邮件(程序自动添加附件)
- vb.net 2005 outlook发送邮件 附件 发送箱
- Outlook发邮件时忘记写主题或者添加附件的脚本解决方法
- vb.NET中为组合框添加自动查询功能
- VB.NET 调用外部程序
- C#(VB.NET)操作Windows自带的防火墙 之 添加/删除允许通过防火墙的例外程序
- VB 调用打开各种文件(自动查找使用默认的程序)
- 一个自动把Visual Studio.NET的C#,VB.NET,VC++project工程转为NAnt Build的小程序(利用XSL)
- [VB.NET]在win服务中添加自动起动服务,每隔五分钟触发一次
- 开发人员在使用Aspose.Pdf for .NET时如何用C#和VB两种代码添加附件到PDF文档?
- ASP.NET 调用2008部署的SMTP服务自动发邮件
- 为自己编写的VB.NET程序添加数字签名
- 客户端调用第三方remoting 服务程序的n中方式,VB.NET 晚期邦定还真方便
- asp.net调用jmail自动发邮件
- asp.net vb中为组合框添加自动查询功能
- [VB.NET]怎样才能在自己的程序自动运行后获得系统中被点击文件夹的路径?(下)
- [转]C#(VB.NET)操作Windows自带的防火墙 之 添加/删除允许通过防火墙的例外程序
- C# 调用outlook 发送邮件 或添加附件发送
- [VB.NET]程序中如何调用系统的快捷键?
- VC 中调用默认邮件发送程序(Outlook)发送 指定附件的email