14783 Lebans Rich Text Control
Sign Up |  Live StatsLive Stats    Articles 37,467| Comments 178,600| Members 19,493, Newest navneet wilkhu| Online 433
Home Contact
 (Forgotten?): 
    10 years of Excellence
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags

Lebans Rich Text Control

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 0 USD (0%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Selecting all existing text in a control DJH Information Technology 3 28-Jul-2006 08:41 AM
Control Source on a Text Box Intrepid_Yellow Information Technology 5 28-Jul-2006 08:37 AM
rich text box download Kylie Information Technology 11 28-Jul-2006 08:21 AM
Text box control source Ray Information Technology 2 28-Jul-2006 08:20 AM
Lebans RichText Control Error 2771 Jesse Information Technology 2 28-Jul-2006 08:03 AM


Tags
lebans, rich, text, control
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:01 AM
Jesse's Avatar Jesse
Guest
 
Posts: n/a
   
   
Lebans Rich Text Control

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I have a form that serves to collect general notes. The text control
is attached to the memo field, as required. I want to display a list
of the notes so the user can select which one to further edit, view or
print. The list shows several items including information from the
memo field (the first 30 characters). The problem lies in the fact
that those first characters are part of the RTF and are not the text
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/9299-lebans-rich-text-control.html
that I want to show. I have tried to create a function that provides
only the text.

Public Function GetNotesText(varText As Variant) As Variant
' Comments : Function to remove RTF formatting and return plain
text
' Parameters: varText - RTF string to evaluate
' Returns : Variant - string that contains just the plain text
from varText or Null
' Created : 08 May 2006 05:42 JA
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9299
' Modified :
' --------------------------------------------------

On Error GoTo ErrorHandler
Dim rtf As RTF2
Set rtf = New RTF2

rtf.RTFtext = varText
GetNotesText = rtf.PlainText

Debug.Print rtf.PlainText
Set rtf = Nothing

ExitHandler:
Exit Function

ErrorHandler:
MsgBox _
Prompt:="Error " & Err.Number & vbNewLine & Err.Description &
vbNewLine & "In FillNotesList."
Resume ExitHandler
End Function

This function, and others similar to it, doesn't work. It appears that
without a "physical" reprepsentation (the OCX control in a form or
report), no text can be assigned or manipulated. Is there a way to
work around this?





Do you agree or disagree with the writer above? Why not share your immediate thoughts with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:01 AM
Pieter Wijnen's Avatar Pieter Wijnen
Guest
 
Posts: n/a
   
   
Re: Lebans Rich Text Control

You probably have to use a form as you've discovered
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9299
This form you can open "hidden" & do your stuff

HTH

Pieter

"Jesse" wrote in message
news:1147253260.919529.233370@g10g2000cwb.googlegr oups.com...
>I have a form that serves to collect general notes. The text control
> is attached to the memo field, as required. I want to display a list
> of the notes so the user can select which one to further edit, view or
> print. The list shows several items including information from the
> memo field (the first 30 characters). The problem lies in the fact
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9299
> that those first characters are part of the RTF and are not the text
> that I want to show. I have tried to create a function that provides
> only the text.
>
> Public Function GetNotesText(varText As Variant) As Variant
> ' Comments : Function to remove RTF formatting and return plain
> text
> ' Parameters: varText - RTF string to evaluate
> ' Returns : Variant - string that contains just the plain text
> from varText or Null
> ' Created : 08 May 2006 05:42 JA
> ' Modified :
> ' --------------------------------------------------
>
> On Error GoTo ErrorHandler
> Dim rtf As RTF2
> Set rtf = New RTF2
>
> rtf.RTFtext = varText
> GetNotesText = rtf.PlainText
>
> Debug.Print rtf.PlainText
> Set rtf = Nothing
>
> ExitHandler:
> Exit Function
>
> ErrorHandler:
> MsgBox _
> Prompt:="Error " & Err.Number & vbNewLine & Err.Description &
> vbNewLine & "In FillNotesList."
> Resume ExitHandler
> End Function
>
> This function, and others similar to it, doesn't work. It appears that
> without a "physical" reprepsentation (the OCX control in a form or
> report), no text can be assigned or manipulated. Is there a way to
> work around this?
>



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:02 AM
Jesse's Avatar Jesse
Guest
 
Posts: n/a
   
   
Re: Lebans Rich Text Control

  Donate Today!  
I don't think that will work. This function is intended to be used
from a query to present a list and if I have to open a hidden form and
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9299
assign it the RTF text so I can extract it and then send the extracted
text to the query, it might prove to slow.

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

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

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

» Active Discussions
Rozana Reports (ਪੰਜਾਬੀ...
Today 03:09 AM
404 Replies, 9,372 Views
What Really Happened on...
Today 02:00 AM
8 Replies, 114 Views
English Sri Guru Granth...
Yesterday 20:24 PM
4 Replies, 123 Views
Free Online Gurbani...
Yesterday 18:34 PM
12 Replies, 4,291 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Yesterday 17:57 PM
255 Replies, 6,007 Views
Difference in Bowing...
By Kamala
Yesterday 16:08 PM
9 Replies, 209 Views
Edward Snowden: the...
Yesterday 11:30 AM
2 Replies, 92 Views
What Is Difference...
Yesterday 09:18 AM
6 Replies, 172 Views
First There is Water by...
By Ishna
Yesterday 05:03 AM
3 Replies, 188 Views
Cooking Without Alcohol
Yesterday 02:12 AM
12 Replies, 187 Views
Learning from Baba...
Yesterday 01:38 AM
0 Replies, 309 Views
Eckhart Tolle
17-Jun-2013 18:08 PM
2 Replies, 117 Views
Thought of the Moment!
17-Jun-2013 16:35 PM
115 Replies, 6,075 Views
New Quantum Dot...
17-Jun-2013 09:38 AM
0 Replies, 61 Views
Girl, 5, Collects...
17-Jun-2013 06:48 AM
0 Replies, 86 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 03:14 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.38672 seconds with 32 queries
0