Dear Sunil,

Please try below code...........
First you add Microsoft Outlook Library..
Step: Press Alt+F11->Tools-Reference->check  Microsoft Outlook 12.0 Object
Library......then run code...
hope it wil be help to u..

Sub mail_current_workbook()

Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim SigString As String
Dim Signature As String
Application.ScreenUpdating = False
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = "noorain.ans...@gmail.com"
.CC = "noorain.ans...@one97.net"
 .Subject = ActiveWorkbook.FullName
.Body = "Messages " & vbCrLf & vbCrLf & " Thanks " & vbCrLf & "Regards" &
vbCrLf & " Noorain Ansari"
.Attachments.Add ActiveWorkbook.FullName
.Send
 End With
Set olMail = Nothing

End sub
-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/>
*http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/>

On Wed, Oct 12, 2011 at 1:20 PM, sunil bn <bnsuni...@gmail.com> wrote:

> Hi,
>
> how to create a macro for Microsoft outlook. Eg.if i just run the macro the
> selected file should attached in new mail.
>
> --
> *Regards*
> **Sunil B.N
> ***9035858585
>
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to