From: <lar...@us...> - 2011-10-11 11:02:07
|
Revision: 104 http://macros4outlook.svn.sourceforge.net/macros4outlook/?rev=104&view=rev Author: larsen255 Date: 2011-10-11 11:01:56 +0000 (Tue, 11 Oct 2011) Log Message: ----------- bugfix: When a sender?\194?\180s name could not be determined correctly, it would have thrown an error 5 Modified Paths: -------------- quotefixmacro/trunk/QuoteFixMacro.bas Modified: quotefixmacro/trunk/QuoteFixMacro.bas =================================================================== --- quotefixmacro/trunk/QuoteFixMacro.bas 2011-09-22 08:04:30 UTC (rev 103) +++ quotefixmacro/trunk/QuoteFixMacro.bas 2011-10-11 11:01:56 UTC (rev 104) @@ -99,6 +99,7 @@ '$Revision$ - not released ' * bugfix: When a mail was signed or encrypted with PGP, the reformatting would yield incorrect results +' * bugfix: When a sender\xB4s name could not be determined correctly, it would have thrown an error 5 ' 'Ideas were taken from ' * Daniele Bochicchio @@ -639,7 +640,14 @@ posLeftBracket = InStr(curLine, "[") '[ is the indication of the beginning of the E-Mail-Adress posRightBracket = InStr(curLine, "]") If (posLeftBracket) > 0 Then - sName = mid(curLine, posColon + 2, posLeftBracket - posColon - 3) + Dim lengthName As Integer + lengthName = posLeftBracket - posColon - 3 + If lengthName > 0 Then + sName = mid(curLine, posColon + 2, lengthName) + Else + Debug.Print "Couldn\xB4t get name. Is the header formatted correctly?" + End If + If posRightBracket = 0 Then sEmail = mid(curLine, posLeftBracket + 8) '8 = Len("mailto: ") Else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |