Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REading from attachment text Outlook 2000

Status
Not open for further replies.

aheu9

Programmer
Sep 7, 2006
17
US
I want to read from an attachment of an email. I can get the attachment item, but I dont know how to read in the text exactly. I am using Outlook 2000.
Thanks in advance!!
Aheu9
 
aheu9,
Based on your question, my first thought would be:[ul]
[li]Open email.[/li]
[li]Double click attachment[/li]
[li]Copy the text[/li]
[li]...[/li][/ul]

Just joking (sort of.)

A couple of questions that may facilitate a better answer.[ol][li]Where are you trying to read the text into (variable, apllication, ...)?[/li]
[li]Do you need all the contents from the file, or only parts?[/li]
[li]What file type is the attachement?[/li]
[li]What have you tried?[/li][/ol]

CMP



[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
thread222-1276021
thread709-1276437

johnwm (Programmer) 7 Sep 06 17:07
Also read FAQ222-2244 to see how to get the best from these forums.
 
I am trying to read in a text file attachment to a variable inside of Outlook 2000 on application startup. I have tried to use the AttachmentRead(attachment object) function but it seems to not be working correctly because I get an error that says it is not a valid method of a MailItem. The item contains text that I will parse and create task items based on the results.
 
aheu9,
My Outlook 2000 shows [tt]AttachmentRead[/tt] as an Event, not a function.

You can use the [tt]Attachment.SaveAsFile()[/tt] function to cache the file to the local hard drive, then read it into your routine using VBA I/O operations, then delete it using [tt]VBA.Kill[/tt].

Application startup?

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top