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

how to break lines from Msg.Body



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 1st 08, 05:47 PM posted to microsoft.public.outlook.program_vba
Tom[_7_]
external usenet poster
 
Posts: 7
Default how to break lines from Msg.Body

with the following assignment

x = Msg.Body

what is the easiest way to read number of lines and strip blank lines from
variable x ?

is there a Line End hex character that can be looped ?

Ads
  #2  
Old September 1st 08, 07:15 PM posted to microsoft.public.outlook.program_vba
Tom[_7_]
external usenet poster
 
Posts: 7
Default how to break lines from Msg.Body

some pseudo code:

dim x_len
dim x
dim line_hold
dim line_loop

x = Msg.Body

x_len = Len(x)

for line_loop = 1 to x_len step 1
if mid(x, line_loop, 1) = vbCrLf then
line_hold = line_hold + 1
x_line = mid(x, line_hold, line_loop - 1)
end if
next


  #3  
Old September 3rd 08, 03:20 PM posted to microsoft.public.outlook.program_vba
Tom[_7_]
external usenet poster
 
Posts: 7
Default how to break lines from Msg.Body

this works

Dim v()
Dim i
Dim this_line

v= split(msg.body, vbCrLf)

for i = 0 to ubound(v)
this_line = v(i)
next
 




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
Graphic in email signature break when sending Mkhan Outlook - Installation 0 May 29th 08 11:47 PM
Line break in outlook 2007 David Outlook and VBA 2 May 28th 08 11:48 PM
Why did Microsoft break OE-6's Dictionary feature . . . .? WGD[_2_] Outlook Express 4 September 9th 07 05:18 PM
Extra lines in the body when FW or RE...NOT in the signature KimCo Outlook - General Queries 0 May 10th 07 04:27 PM
How to input line break in the body of an email defined in vb. Xluser@work Outlook and VBA 1 February 22nd 06 02:20 PM


All times are GMT +1. The time now is 08:08 AM.


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