Hi Ashish, Am still getting compile error since i am using microsoft outlook 2000 version. Can this code work in 2000 version or I should execute this code using 2007 version. Please advice me.
Thanks, Sharma On Fri, Aug 27, 2010 at 1:51 PM, ashish koul <koul.ash...@gmail.com> wrote: > > > On Fri, Aug 27, 2010 at 1:37 PM, ashish koul <koul.ash...@gmail.com>wrote: > >> in reference select Microsoft outlook >> >> >> Regards >> Ashish koul >> akoul.blogspot.com >> >> >> >> >> On Fri, Aug 27, 2010 at 10:06 AM, amrahs k <amrahs...@gmail.com> wrote: >> >>> Hi Koul, >>> >>> Thanks a lot for your effort and time. I have a response for the below >>> code. >>> >>> I get compile error: Can't find project or library while running macro. >>> >>> line error: Dim olApp As Outlook.Application >>> Please look into this and advice me how to proceed with this. >>> >>> Regards, >>> Sharma >>> >>> On Thu, Aug 26, 2010 at 9:18 PM, ashish koul <koul.ash...@gmail.com>wrote: >>> >>>> Sub maildata() >>>> >>>> >>>> Dim a As Workbook >>>> Dim data As Range >>>> >>>> Set data = ThisWorkbook.Sheets(1).Range("a1:f27") >>>> data.Copy >>>> >>>> Set a = Workbooks.Add >>>> >>>> a.Sheets(1).Cells(1, 1).Select >>>> >>>> ActiveSheet.Paste >>>> >>>> MsgBox ThisWorkbook.Path >>>> a.SaveAs ThisWorkbook.Path & "\abc1.xls" >>>> a.Close >>>> >>>> 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 = "koul.ash...@gmail.com" >>>> .CC = "a...@rediffmail.com" >>>> .Subject = "Incoming Status!" >>>> .Body = "Messages " & vbCrLf & vbCrLf & " Thanks " & vbCrLf & "Regards" >>>> & vbCrLf & " Ashish Koul" >>>> .Attachments.Add ThisWorkbook.Path & "\abc1.xls" >>>> .Send >>>> End With >>>> >>>> Set olMail = Nothing >>>> 'Kill ThisWorkbook.Path & "\abc1.xls" >>>> >>>> End Sub >>>> >>>> >>>> Regards >>>> Ashish Koul >>>> akoul.blogspot.com >>>> >>>> >>>> >>>> >>>> On Wed, Aug 25, 2010 at 8:48 AM, amrahs k <amrahs...@gmail.com> wrote: >>>> >>>>> Hi Team Members, >>>>> >>>>> I have a query with regard to outlook email. Can anyone please suggest >>>>> or advice me how to proceed with this. >>>>> >>>>> Requirement: An email should be send automatically with below subject >>>>> and body to the mentioned address. Copying the left most sheet in the >>>>> attached excel in a separate workbook.(Please refer attached excel sheet) >>>>> >>>>> Details: >>>>> >>>>> To:= amrahs...@gmail.com >>>>> CC:= amra...@gmail.com >>>>> >>>>> Subject:= Incoming Status! >>>>> Body:= Tracker have been updated and Job card is generated for the >>>>> same. Please check the attachment for more details. >>>>> >>>>> Thanks in Advance, >>>>> >>>>> Regards, >>>>> Sharma >>>>> >>>>> >>>>> -- >>>>> >>>>> ---------------------------------------------------------------------------------- >>>>> 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 >>>>> >>>>> <><><><><><><><><><><><><><><><><><><><><><> >>>>> HELP US GROW !! >>>>> >>>>> We reach over 7000 subscribers worldwide and receive many nice notes >>>>> about the learning and support from the group.Let friends and co-workers >>>>> know they can subscribe to group at >>>>> http://groups.google.com/group/excel-macros/subscribe >>>>> >>>> >>>> -- >>>> >>>> ---------------------------------------------------------------------------------- >>>> 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 >>>> >>>> <><><><><><><><><><><><><><><><><><><><><><> >>>> HELP US GROW !! >>>> >>>> We reach over 7000 subscribers worldwide and receive many nice notes >>>> about the learning and support from the group.Let friends and co-workers >>>> know they can subscribe to group at >>>> http://groups.google.com/group/excel-macros/subscribe >>>> >>> >>> -- >>> >>> ---------------------------------------------------------------------------------- >>> 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 >>> >>> <><><><><><><><><><><><><><><><><><><><><><> >>> HELP US GROW !! >>> >>> We reach over 7000 subscribers worldwide and receive many nice notes >>> about the learning and support from the group.Let friends and co-workers >>> know they can subscribe to group at >>> http://groups.google.com/group/excel-macros/subscribe >>> >> >> > -- > > ---------------------------------------------------------------------------------- > 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 > > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 7000 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > -- ---------------------------------------------------------------------------------- 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 <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe