Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

paste information into an email

Status
Not open for further replies.

smiler44

Technical User
Sep 18, 2009
83
GB
I want to paste information into an already open email from office 2007.
I am not replying to an email but have opened a new email to send. I will send it manually. I can copy information from the extra screen but cannot paste it into an email, an already open email.
How do i take control of an open email and paste to it?

Thank you in advance
smiler44
 
This opens a new mail, not sure how to take control of an allready open mail.

Code:
On Error GoTo SendMail_Err
    
NL = Chr (13) + Chr (10)

Set oOutlook = CreateObject("Outlook.Application")
Set oMailItem = oOutlook.CreateItem(olMailItem)

With oMailItem
    .Display 'Show it, don't know why it returns error, but it is handled in Sendmail_Err and does display the screen.
    .To = mailAdress
    .Subject = subjectName
    .Body = "Info" + NL + .Body
    If File <> "" Then
        .Attachments.Add File
    End if
    .Send 'Send the mail
End With
        
    'Tidy Up
    Set oOutlook = Nothing
    Set oMailItem = Nothing
    
Exit Sub

SendMail_Err:
If Err = 438 Then
    Resume Next
End If
MsgBox "Error occured."
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top