Answered by:
Extracting Email address from word file

Question
-
Guys i am new to programming
I have a word file that i need to read all emails from and create an email list.
any idea how do i do so ?
thanks
Thursday, January 12, 2012 3:58 AM
Answers
-
Hi EladRez,
Welcome to the MSDN Forum.
Firstly, you need to read the word text, please refer to this codeproject for more information: http://www.codeproject.com/KB/cs/getwordtext.aspx
and then you can use regular expression to retrieve the email address: http://www.codeproject.com/KB/recipes/EmailRegexValidator.aspx
Since the samples is in C#, so this online tool translate tool should be helpful: http://www.developerfusion.com/tools/convert/csharp-to-vb/
I hope this will be helpful.
Best regards,
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Edited by Mike Feng Friday, January 13, 2012 11:06 AM
- Proposed as answer by Devon_Nullman Saturday, January 14, 2012 4:52 AM
- Marked as answer by Mike Feng Sunday, January 29, 2012 7:01 AM
Friday, January 13, 2012 11:04 AM
All replies
-
Hi EladRez,
Welcome to the MSDN Forum.
Firstly, you need to read the word text, please refer to this codeproject for more information: http://www.codeproject.com/KB/cs/getwordtext.aspx
and then you can use regular expression to retrieve the email address: http://www.codeproject.com/KB/recipes/EmailRegexValidator.aspx
Since the samples is in C#, so this online tool translate tool should be helpful: http://www.developerfusion.com/tools/convert/csharp-to-vb/
I hope this will be helpful.
Best regards,
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Edited by Mike Feng Friday, January 13, 2012 11:06 AM
- Proposed as answer by Devon_Nullman Saturday, January 14, 2012 4:52 AM
- Marked as answer by Mike Feng Sunday, January 29, 2012 7:01 AM
Friday, January 13, 2012 11:04 AM -
Why do you post a C# answer in a VB forum ?
Saturday, January 14, 2012 2:02 AM -
Why do you post a C# answer in a VB forum ?
Make no sense.
If the C# code help you, you can close the thread, if you don't know C# code, and you cannot translate it to VB.net code, so just post the code you don't understand.
We focus on your issue, rather than the programming language.
Call me ghost for short, Thanks
To get the better anwser, it should be a better question.Monday, January 16, 2012 7:01 AM -
Try this in the Regex forum, finding a Email address is seldom done with VB code as this is typical a Regex problem. Regex can be used in VB.
http://social.msdn.microsoft.com/Forums/en/regexp/threads
Success
CorMonday, January 16, 2012 7:37 AM