Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

Search text  for CHR$(13) - split it over lines in table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gina - 01 Mar 2005 14:32 GMT
Hi

I am having a problem to spread a text over a couple of lines as soon as a
CHR$(13) is found.

it is found but the rest of the text (could be many lines) doesn't go to the
next line in my word table.

I obviously have to get the rest of the text but I don't know how to do
this! :(
.... I would be very grateful for some code ... please help

_______________________________
       If (RSText("Discription").Value <> 0) Then
           strToComp= RSText("Discription")
           If InStr(1, strToComp, Chr$(13)) Then
               .MoveDown Unit:=wdLine, Count:=1
           Else
               .MoveRight Unit:=wdCell, Count:=1
               .MoveDown Unit:=wdLine, Count:=1
               .TypeText Text:=RSText("Discription")
           End If
       End If
_______________________________

Thanks,
Gina
Gina - 01 Mar 2005 15:28 GMT
Think I have to add some clarifing lines:

What I wanted to do is to check a text for a paragraph character
if it is found take the left part of the string (up to the paragrapf
character)
and write it to a line
go on checking for further paragraph characters in the rest of the string
left
if a further paragraph character is found read to a certain strTemp and
write it to the next line

this basically should go to the dotted line ... but actually don't have a
clou how
Gina

> _______________________________
>         If (RSText("Discription").Value <> 0) Then
>             strToComp= RSText("Discription")
>             If InStr(1, strToComp, Chr$(13)) Then
>                 .MoveDown Unit:=wdLine, Count:=1

---> .....................................................................
>             Else
>                 .MoveRight Unit:=wdCell, Count:=1
[quoted text clipped - 6 lines]
> Thanks,
> Gina
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.