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
Comments
Post a Comment