PC Review


Reply
Thread Tools Rate Thread

Deleting a row in a message (opposite to VbCrLf)

 
 
Wesslan
Guest
Posts: n/a
 
      14th Feb 2008
Hi,

I am interested in deleting a blank row in a message. I know that if I
want to add a row I use the command VbCrLf, but is there one to delete
a row?

Any help/suggestions greatly appreciated.

Regards

Peder
 
Reply With Quote
 
 
 
 
RB Smissaert
Guest
Posts: n/a
 
      14th Feb 2008
Maybe you need to show your code, but perhaps something like this:

Dim strMsg as string

strMsg = "message" & vbcrlf & "with linebreak"

strMsg = Replace(strMsg, vbcrlf, vbnullstring)

Msgbox strMsg


RBS


"Wesslan" <(E-Mail Removed)> wrote in message
news:399fbd5e-aea8-4f13-a886-(E-Mail Removed)...
> Hi,
>
> I am interested in deleting a blank row in a message. I know that if I
> want to add a row I use the command VbCrLf, but is there one to delete
> a row?
>
> Any help/suggestions greatly appreciated.
>
> Regards
>
> Peder


 
Reply With Quote
 
Wesslan
Guest
Posts: n/a
 
      14th Feb 2008
RB Smissaert,

Sorry I should have showed the code right away. You suggestion is a
good one, however in my case it will lead to that all my VbCrLf are
replaced with nothing. Hence I loose all my row breaks

The code is:

Sub Top3Peers()
ttext = ""
SelectRow = 10

For i = 1 To 3

SPI = wbook1.Worksheets("Global - " & strSize & "
Cap").Range("N" & SelectRow).Value
SPI = Round(SPI)

' The company analysed is not to be part of peers
If Application.Proper$(wbook1.Worksheets(Sht).Range("C" &
SelectRow).Value) = Company Then SelectRow = SelectRow + 1

ttext = ttext & Application.Proper$
(wbook1.Worksheets(Sht).Range("C" & SelectRow).Value) & " (SPI " & SPI
& ")"
ttext = ttext & vbCrLf
SelectRow = SelectRow + 1
Next i
oPPTApp.ActiveWindow.Selection.SlideRange.Shapes(Rectangle).Select

oPPTApp.ActiveWindow.Selection.ShapeRange.GroupItems(Index:=strIndex).TextFrame.TextRange.Characters(Start:=1,
Length:=250).Select
oPPTApp.ActiveWindow.Selection.TextRange.Text = ttext

End Sub

I am looping and for earch firm and result that is taken in, a new
line is created. However, when the loop finishes there will naturally
be one too many. Any suggestions?

Regards,
Peder
 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      14th Feb 2008
Simpy replace this:

ttext = ttext & vbCrLf

with this:

If i < 3 then
ttext = ttext & vbCrLf
end if


RBS

"Wesslan" <(E-Mail Removed)> wrote in message
news:02e8e7c9-1d6d-4926-8447-(E-Mail Removed)...
> RB Smissaert,
>
> Sorry I should have showed the code right away. You suggestion is a
> good one, however in my case it will lead to that all my VbCrLf are
> replaced with nothing. Hence I loose all my row breaks
>
> The code is:
>
> Sub Top3Peers()
> ttext = ""
> SelectRow = 10
>
> For i = 1 To 3
>
> SPI = wbook1.Worksheets("Global - " & strSize & "
> Cap").Range("N" & SelectRow).Value
> SPI = Round(SPI)
>
> ' The company analysed is not to be part of peers
> If Application.Proper$(wbook1.Worksheets(Sht).Range("C" &
> SelectRow).Value) = Company Then SelectRow = SelectRow + 1
>
> ttext = ttext & Application.Proper$
> (wbook1.Worksheets(Sht).Range("C" & SelectRow).Value) & " (SPI " & SPI
> & ")"
> ttext = ttext & vbCrLf
> SelectRow = SelectRow + 1
> Next i
> oPPTApp.ActiveWindow.Selection.SlideRange.Shapes(Rectangle).Select
>
> oPPTApp.ActiveWindow.Selection.ShapeRange.GroupItems(Index:=strIndex).TextFrame.TextRange.Characters(Start:=1,
> Length:=250).Select
> oPPTApp.ActiveWindow.Selection.TextRange.Text = ttext
>
> End Sub
>
> I am looping and for earch firm and result that is taken in, a new
> line is created. However, when the loop finishes there will naturally
> be one too many. Any suggestions?
>
> Regards,
> Peder


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting task without deleting e-mail; message views ideaman Microsoft Outlook Discussion 1 30th Sep 2009 03:34 AM
Outlook 2007 Doesn't Move to Next Message Deleting IMAP Message Johnnie Microsoft Outlook Discussion 2 3rd Jun 2009 03:21 PM
Deleting a message in an open window opens the next message in Inb =?Utf-8?B?U0NhbA==?= Windows Vista Mail 8 1st Jan 2008 05:24 PM
Outlook 2007 doesn't open next message after deleting a message =?Utf-8?B?TWFsY01hY1E=?= Microsoft Outlook Discussion 1 25th May 2006 07:49 AM
Dual monitor - box for "reply to" message always shows on opposite monitor Dave Microsoft Outlook 1 25th Oct 2003 07:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:26 PM.