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

Append Body of Email to Text File



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 10th 06, 10:56 PM posted to microsoft.public.outlook.program_vba
J
external usenet poster
 
Posts: 42
Default Append Body of Email to Text File

What is the VB code to append the body of an email to a text file?
Ads
  #2  
Old September 11th 06, 07:10 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Append Body of Email to Text File

Am Sun, 10 Sep 2006 13:56:01 -0700 schrieb j:

This sample allows you to append the text to a file:

Public Sub WriteFile(ByRef Path As String, _
ByRef Text As String, _
Optional ByVal bAppend As Boolean _
)
On Error GoTo AUSGANG
Dim FileNr As Long

FileNr = FreeFile

Select Case bAppend
Case False
Open Path For Output As #FileNr
Case Else
Open Path For Append As #FileNr
End Select

Print #FileNr, Text;

AUSGANG:
If FileNr Then CloseFileHandle FileNr
End Sub

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


What is the VB code to append the body of an email to a text file?

 




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
append text at specific location in the message newbies Outlook and VBA 3 August 11th 06 02:01 PM
File content to be the text body of mail [email protected] Outlook and VBA 1 August 3rd 06 01:23 PM
Adding HTML text to the email body for each recipient Tom at GSD Add-ins for Outlook 2 July 7th 06 12:25 AM
How do I append text to the body of a email? Beginner Outlook and VBA 2 February 9th 06 10:36 PM
Dragging an email to the Calendar drops the email body text yan Outlook - Calandaring 2 February 1st 06 02:23 AM


All times are GMT +1. The time now is 08:52 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.