2006-12-12, 16:24 #1
- Join Date
- Jul 2001
- Ottawa, Ontario, Canada
- Thanked 0 Times in 0 Posts
Outlook text into Excel (VBA/Outlook/2003)
We have a need to capture structured text from e-mail messages and move it into Excel. As comfortable as I am with the Excel end of things--thanks to the tremendous support provided by the Lounge--I am unable to get started in the Outlook environment. The body of the message will look like: <pre>Filename=Test File
Can someone provide some guidance please? I dont want to force the user to copy the text then move to Excel and run a macro.Regards
Subscribe to our Windows Secrets Newsletter - It's Free!
Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!
+ Get this BONUS — free!
Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!
2006-12-12, 16:46 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 93 Times in 89 Posts
Re: Outlook text into Excel (VBA/Outlook/2003)
Is the user starting with an open message on the screen? You could try something like this. If the format is HTML, there will be stray text added during the conversion, so it's certainly not bulletproof!
stringArray() = Split(Activeinspector.currentitem.body, vbCrLf)
If you were processing message in bulk from a selection in a folder, you can grab individual messages using a For...Next to loop through Activeexplorer.Selection.