Jump to content
Sign in to follow this  
litlmike

Keep Formatting when using ControlSetText

Recommended Posts

Problem:

Currently use ControlGetText () and ControlSetText () to read then replace the values in a control in Eudora 6.2 (email client). Works great unless the text has some sort of formatting like Bold, Italics, Hyperlink, Bullet Points; in this case the formatting is lost. Anyway to preserve this formatting? Or maybe put better another way, can ControlSetText() ever preserve formatting? If not, is there a workaround?

Thanks in Advance.

Global $cat_1, $date_a, $email, $contact, $company, $email

Func Eudora_Change ()
;Focus on ComboBox with <none>, Assistant, GG-Signature
$cat_1A = GUICtrlRead($cat_1)
$date_a_A = GUICtrlRead($date_a)
ControlCommand ("Eudora","","ComboBox3", "SetCurrentSelection", 0)
ControlSetText("Eudora", "", "Edit1", $email)
ControlSetText("Eudora", "", "Edit3", "ATTN: " & $contact)
ControlFocus("Eudora", "", "EudoraEdit1")
$email_body = ControlGetText ( "Eudora", "","EudoraEdit1" )
$AddNotes_New = StringReplace ( $email_body, "NNNNN", $contact)
$AddNotes_NewA = StringReplace ( $AddNotes_New, "XXXXX", $company)
$AddNotes_NewB = StringReplace ( $AddNotes_NewA, "ZZZZZ", $cat_1A) ;Put Category in Email
$AddNotes_NewC = StringReplace ( $AddNotes_NewB, "[APPOINTMENT DATE]", $date_a_A) ;Put Category in Add Notes
ControlSetText ( "Eudora", "", "EudoraEdit1", $AddNotes_NewC )

EndFunc
Edited by litlmike

Share this post


Link to post
Share on other sites

I don't have Eudora to even try and test the theories I may have at the moment. What did google reveal?

I have been ill and away from a PC for a few days and just now returning to this.

I didn't find much in Google, but then again, I am not sure if I was searching for the right terms. I mostly researched formatting/coding eudora types of keywords. I even posted in their Forums, but no response yet.

How can I be of further assistance? I am definitely willing to work for this answer, but I just don't know where to work!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...