A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Newbie: Need to read emails that are stored in a folder w/ VBA



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old August 14th 06, 11:26 AM posted to microsoft.public.outlook.program_vba
Greg J
external usenet poster
 
Posts: 8
Default Newbie: Need to read emails that are stored in a folder w/ VBA

Hmmm, not sure about why your menu items and toolbars would be
disabled.

Try changing the function to a Sub, that way it will appear in the list
when you click Tools Macros and you can run the code from Outlook
interface instead of the code module.

As far as FSO goes, link the reference called Windows Script Host
Object Model, or a much simpler way is to use the following code with
existing references. To get extra help with this, position the cursor
on 'Open' and press F1, it should open a page describing the 'Open
Statement'.

Open "e:\test.csv" For Output As #1 'Opens a file ready for input
Print #1, "test1" 'Writes a new line to
the file
Print #1, "test2" 'Writes a new line to
the file
Print #1, "test3" 'Writes a new line to
the file
Close #1 'Closes the file

So to get this code to work you would create a variable that contains
the entire contents of a line then use the Print statement to write the
whole line to the file.

The file called e:\test.csv contains the following:

test1
test2
test3

Hope this helps


Greg J

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are Local Folder E-mails Stored? illinifan1985 Outlook Express 4 July 9th 06 05:34 PM
Selective Read Receipts VBA using run a script rule prideoflions Outlook and VBA 5 May 26th 06 03:31 PM
VBA to move outbound email and mark as read? [email protected] Outlook and VBA 11 May 2nd 06 03:07 PM
OE6 'stored folder' problem Aya Outlook Express 3 April 26th 06 01:52 AM
How do I call a stored procedure inside my sql with a vba script? Computer Newbie Outlook and VBA 1 March 14th 06 07:08 AM


All times are GMT +1. The time now is 03:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.