+ Reply to Thread
Results 1 to 6 of 6

“Run time error '9' Subscript out of range” shows up while trying to fetch the Email body

  1. #1
    Registered User
    Join Date
    06-08-2013
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    3

    “Run time error '9' Subscript out of range” shows up while trying to fetch the Email body

    I am trying to fetch the part of the Email body from outlook to Excel file using the following coding. It is giving me error as “Run time error '9' Subscript out of range “ as specified in the coding below. Would someone please review my code below and help me out. Thank you

    My Code:

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: “Run time error '9' Subscript out of range” shows up while trying to fetch the Email b

    On which line did you get the error?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Where are you running this code?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    06-08-2013
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: “Run time error '9' Subscript out of range” shows up while trying to fetch the Email b

    In the code i have mentioned where the error shows up. Thank you for the reviewing it

  5. #5
    Registered User
    Join Date
    06-08-2013
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: “Run time error '9' Subscript out of range” shows up while trying to fetch the Email b

    As macro in the outlook i am running this code

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: “Run time error '9' Subscript out of range” shows up while trying to fetch the Email b

    The error could be because vitem isn't actually an array.

    You can check that in the Locals Window (View>Local Windows) when you get the error.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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