jim may
Well-known Member
- Joined
- Jul 4, 2004
- Messages
- 7,486
I'm creating an Excel Sys that will Open a series of Outlook e-mails (say 20) and bring them into a worksheet and paste the single string into A1:A20;
I initially have done this Using Excel 2003 and importing from a Outlook 2007 (What I use in my Office) inbox folder,
which seems to work fine;
I took my Excel 2003 Fule to a Client - who also runs (only) Excel 2003 and ran the same macro (The CLIENT RUNS Outlook 2003 (not 2007) ,, and I seem to be getting different results, INCLUDING some Error's like
R/T error '5':
Invalid procedure call or argument
with the offending line Activesheet.Cells ...(after the Do) as:
Do
Activesheet.cells(i, 1).value = _
Mid(stBody, LineBreak, InStr(LineBreak, stBody, Shr(10)) - LineBreak)
LineBreak = InStr(LineBreak + 1, stBody, Chr(10)) + 1
i = i + 1
Loop Until LineBreak = 0 Or LineBreak > Len(stBody)
Can anyone see why this could be happening?
TIA,
Jim
I initially have done this Using Excel 2003 and importing from a Outlook 2007 (What I use in my Office) inbox folder,
which seems to work fine;
I took my Excel 2003 Fule to a Client - who also runs (only) Excel 2003 and ran the same macro (The CLIENT RUNS Outlook 2003 (not 2007) ,, and I seem to be getting different results, INCLUDING some Error's like
R/T error '5':
Invalid procedure call or argument
with the offending line Activesheet.Cells ...(after the Do) as:
Do
Activesheet.cells(i, 1).value = _
Mid(stBody, LineBreak, InStr(LineBreak, stBody, Shr(10)) - LineBreak)
LineBreak = InStr(LineBreak + 1, stBody, Chr(10)) + 1
i = i + 1
Loop Until LineBreak = 0 Or LineBreak > Len(stBody)
Can anyone see why this could be happening?
TIA,
Jim