vba - Copying Outlook email body to .csv -


after running code, getting run-time error 9 ( subscript out of range ).

i getting error on line :

xlsheet.range("k" & rcount) = trim(varitem(1)) 

i looked through code , can't seem figure out doing wrong or missing.

here code & see below email body looks like

            '// customer             if instr(1, vartext(i), "customer") > 0                 varitem = split(vartext(i), chr(58))                 xlsheet.range("a" & rcount) = trim(varitem(1))             end if               '// service level             if instr(1, vartext(i), "service level") > 0                 varitem = split(vartext(i), chr(58))                 xlsheet.range("k" & rcount) = trim(varitem(1))             end if 

enter image description here

switch chr(58)) chr(9))' horizontal tab

varitem = split(vartext(i), chr(9)) 

look @ vba [chr]


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

c# - Retrieve google contact -

javascript - How to insert selected radio button value into table cell -