Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Outlook Newsgroups
Outlook VBA Programming
macro to reply sometimes fails - why?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Michael Bednarek, post: 4883831"] There's nothing specific to Outlook VBA about any of this. At least you should simplify the code above to If ... Then ... Else ... End If or you could use the Iff() function: .HTMLBody = ... & Iif(InStr(1, myItem.SenderName, " ") > 0, Left$(myItem.SenderName, InStr(1, myItem.SenderName, " ") - 1), myItem.SenderName) & ... (untested) or you could break the .SenderName at the at-sign ("@"). It's probably more efficient to extract whatever you decide from .Sendername into a variable using a dedicated code section, and then using that variable in the construction of .HTMLBody. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Outlook Newsgroups
Outlook VBA Programming
macro to reply sometimes fails - why?
Top