Dim link As String = "mailto://" & emailDir.GetCurrentRow("strEmail")
Try
Process.Start("OutLook.exe", link)
...
Is there any way to accomplish this?
Using OutLook with VB.NET
I''m trying to add a feature to my application so that when the user clicks a button, it allows them to type an email up in a seperate form, and then send it using Outlook, passing in values from textboxes. So far, I''ve been able to get it to send the email address to outlook using the commands:
Try Process.Start''ing a mailto: link instead.
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
I already caught mistake that after I posted. I just can''t find any information on how to fill the subject and message fields in outlook.
What about of using the outlook object model to start outlook and get some REAL control over it?
Right now, I have a rich textbox where the body of the email is entered, and I have added checkboxes to make the text bold, italicized, and/or underlined, which work correctly when I type the email body in the form. When I go to send the email, the formatting I do is lost and the result is just plain text. I can't determine whether or not this is a coding problem, or if it's something I need to set on outlook. My code for sending the email is:
[edited by - MetroidHunter on June 19, 2003 1:31:17 PM]
Dim oLapp As Object Dim oItem As Object Try oLapp = CreateObject("Outlook.application") oItem = oLapp.CreateItem(0) With oItem .Subject = txtSubject.Text .To = txtSendTo.Text .Body = rtbMessage.Text .Send() End With MsgBox("Email sent!", MsgBoxStyle.Information, emailDir.GetAppName) Catch f As Exception MsgBox("Email could not be sent." & CrLf & "Make sure Outlook is configured properly.", MsgBoxStyle.Information, emailDir.GetAppName) Finally oLapp = Nothing oItem = Nothing Me.Close() End Try
[edited by - MetroidHunter on June 19, 2003 1:31:17 PM]
Outlook(and any other decent mail client) is usually set to wrap text at ~76 characters.
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement