+ Reply to Thread
Results 1 to 3 of 3

need Outlook Macro to copy ranges from email attachment to local excel file in C drive

  1. #1
    Registered User
    Join Date
    11-20-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    17

    need Outlook Macro to copy ranges from email attachment to local excel file in C drive

    Team,

    I have the below codes which I copied from google and edited a bit. but not working as per my requirement.

    the objective is to :

    identify an email in inbox with a specific subject line "Ageing Report" --> copy the ranges in that report from cell A2 to till end of the row which contains data --> paste it in the cell "A6" onwards in the specific local file "C:\Users\dlatha\Desktop\Collate.xlsx" --> and delete all the cells which are not relevant (for example : after copying data copied till row 565 the macro should delete/clear contents from row 566 onwards)

    As said I copied the below codes from google and bit confused where to edit and what to edit to suit my requirement.

    Kindly help.

    Please Login or Register  to view this content.
    Last edited by Latha d; 09-10-2015 at 07:36 AM.

  2. #2
    Forum Contributor
    Join Date
    05-27-2014
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    2007 & 2010
    Posts
    273

    Re: need Outlook Macro to copy ranges from email attachment to local excel file in C drive

    Can you supply a sample of the workbook and an email? Also, where does the code breakdown or what does it do that it shouldn't or not do that it should?
    Last edited by kadeo; 09-10-2015 at 08:46 AM.
    Please click *Add Reputation if I've helped

  3. #3
    Registered User
    Join Date
    11-20-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: need Outlook Macro to copy ranges from email attachment to local excel file in C drive

    hi Thanks for the reply.

    the above code works till it opens the file which is saved on desktop "NewExcel"
    then code breakdown at the below line
    With olitem.Attachments.Item(1) and gives runtime error 91 "object variable or with block variable not set"

    i m unable to supply sample workbook and email.

    But

    The email is having a subject line with words "Ageing report- blah blah blah" from a specific user "[email protected]". (infact, this is for my office project. so i will be using my outlook 2010 and the email ID would be of some user from my organisation.)

    then it has to copy ranges from "A2 : I" till the end of the row which has data. and then paste it to preexists file on desktop "NewExcel.xlsx" from cell "A6" onwards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Saving File Attachment from Outlook to Network Drive
    By TRMoonPunk in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-30-2014, 02:36 PM
  2. copy data from outlook email attachments to a local file
    By s_samira_21 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2014, 10:24 AM
  3. copy data from outlook attached excel file into a local one
    By s_samira_21 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-17-2014, 03:36 PM
  4. Copy Outlook email attachments to Local drive(specified Path)
    By Nanimadhu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2014, 08:26 AM
  5. [SOLVED] Macro for Auto outlook email with attachment from excel
    By aganesan99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2014, 05:35 AM
  6. Replies: 0
    Last Post: 08-14-2013, 04:26 PM
  7. Create macro to open daily email and Excel attachment from Outlook
    By uimhirADo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2012, 09:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1