Click here to Skip to main content
15,886,100 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionScreen Saver Preview in VB.NET Pin
Tom Verkaaik15-Feb-07 13:14
Tom Verkaaik15-Feb-07 13:14 
Questionobject reference Pin
jds120715-Feb-07 10:56
jds120715-Feb-07 10:56 
AnswerRe: object reference Pin
TwoFaced15-Feb-07 11:17
TwoFaced15-Feb-07 11:17 
QuestionTable named "Note" Pin
matryxxx15-Feb-07 9:11
matryxxx15-Feb-07 9:11 
AnswerRe: Table named "Note" Pin
Christian Graus15-Feb-07 9:31
protectorChristian Graus15-Feb-07 9:31 
GeneralRe: Table named "Note" Pin
matryxxx15-Feb-07 9:37
matryxxx15-Feb-07 9:37 
GeneralRe: Table named "Note" Pin
Dave Kreskowiak15-Feb-07 13:12
mveDave Kreskowiak15-Feb-07 13:12 
Questionediting attachment before sending it Pin
7prince15-Feb-07 5:35
7prince15-Feb-07 5:35 
Hello,

I have an VB.NET application and need to edit attahment before sending it.

Here is my current code which sends email automatically using outlook.
But I need to open outlook first, in case attachment needs to be edited by user.

Does anyone know how to do it? thanks, Joseph


' Create an Outlook application.
Dim oApp As Outlook._Application
oApp = New Outlook.Application()

' Create a new MailItem.
Dim oMsg As Outlook._MailItem
oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oMsg.Subject = "Termination Notification,Final Check Needed"
oMsg.Body = "Termination Notice For Final Payroll Check" & vbCr & vbCr

' Replace with a valid e-mail address.
oMsg.To = "Joseph.Kacan@banfield.net"

' Add an attachment
' Replace with a valid attachment path.
Dim sSource As String = "\\M1Data02\josephk$\Data\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\TermReport.rtf"
' TODO: Replace with attachment name
Dim sDisplayName As String = "Termination.rtf"

Dim sBodyLen As String = oMsg.Body.Length
Dim oAttachs As Outlook.Attachments = oMsg.Attachments
Dim oAttach As Outlook.Attachment
oAttach = oAttachs.Add(sSource, , sBodyLen + 1, sDisplayName)

' Send
oMsg.Send()

' Clean up
oApp = Nothing
oMsg = Nothing
oAttach = Nothing
oAttachs = Nothing




programmer

Questionget all directories in Computer Pin
turtle101015-Feb-07 4:24
turtle101015-Feb-07 4:24 
AnswerRe: get all directories in Computer Pin
Marcus J. Smith15-Feb-07 4:29
professionalMarcus J. Smith15-Feb-07 4:29 
AnswerRe: get all directories in Computer Pin
Colin Angus Mackay15-Feb-07 4:34
Colin Angus Mackay15-Feb-07 4:34 
GeneralRe: get all directories in Computer Pin
turtle101015-Feb-07 6:53
turtle101015-Feb-07 6:53 
GeneralRe: get all directories in Computer Pin
Dave Kreskowiak15-Feb-07 13:08
mveDave Kreskowiak15-Feb-07 13:08 
GeneralRe: get all directories in Computer Pin
Colin Angus Mackay15-Feb-07 13:43
Colin Angus Mackay15-Feb-07 13:43 
AnswerRe: get all directories in Computer Pin
ednrgc15-Feb-07 4:51
ednrgc15-Feb-07 4:51 
Questioncomponents file in vb.net Pin
amaneet15-Feb-07 4:12
amaneet15-Feb-07 4:12 
Questionserver error Pin
Sarfaraj Ahmed15-Feb-07 3:37
Sarfaraj Ahmed15-Feb-07 3:37 
AnswerRe: server error Pin
Dave Kreskowiak15-Feb-07 13:03
mveDave Kreskowiak15-Feb-07 13:03 
Questionhai Pin
Ishwarya M15-Feb-07 2:31
Ishwarya M15-Feb-07 2:31 
AnswerRe: hai Pin
Marcus J. Smith15-Feb-07 3:02
professionalMarcus J. Smith15-Feb-07 3:02 
GeneralRe: hai Pin
Ishwarya M15-Feb-07 4:12
Ishwarya M15-Feb-07 4:12 
AnswerRe: hai Pin
Colin Angus Mackay15-Feb-07 4:19
Colin Angus Mackay15-Feb-07 4:19 
GeneralRe: hai Pin
Marcus J. Smith15-Feb-07 4:25
professionalMarcus J. Smith15-Feb-07 4:25 
GeneralRe: hai Pin
Colin Angus Mackay15-Feb-07 4:31
Colin Angus Mackay15-Feb-07 4:31 
AnswerRe: hai Pin
Marcus J. Smith15-Feb-07 4:46
professionalMarcus J. Smith15-Feb-07 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.