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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text IO in Outlook VBA 1

Status
Not open for further replies.

wmin

Programmer
Feb 10, 2003
55
GB
Is there a way of reading text files with Outlook VBA?
 
In the VBA help file take a look at Open, Line Input #, EOF, Close, ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi wmin,

Something like this ..

Code:
[blue]Open "[i]Drive:\Path\File.txt[/i]" For Input As #1
Do While Not EOF(1)
    Line Input #1, TextRecord
    MsgBox TextRecord [green]' Or whatever you want [/green]
Loop
Close #1[/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top