Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending instructions to MS Outlook
Message
From
11/05/2005 10:58:54
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01012145
Message ID:
01012889
Views:
20
Please use the corrected version of getwebcolor()
Function getwebcolor
LPARAMETERS lxPrefix
LOCAL lcHex,lcReturn
lcReturn=IIF(PCOUNT()>0,'#','')
lcHex=Transform(GetColor(),'@0')
Return lcReturn + RIGHT(lcHex, 2) + SUBSTR(lcHex, 7,2) + SUBSTR(lcHex, 5,2)
Here's my function to convert numeric color values into hex values
Function num2webcolor
LPARAMETERS lnColor,lxPrefix
LOCAL lcHex,lcReturn
lcReturn=IIF(PCOUNT()>1,'#','')
lcHex=Transform(lnColor,'@0')
Return lcReturn + RIGHT(lcHex, 2) + SUBSTR(lcHex, 7,2) + SUBSTR(lcHex, 5,2)
>Great...thanks.
>glenn
>
>>For question no. 2, I made this function
>>Function getwebcolor
>>Return Substr(Transform(GetColor(),'@0'),5)
>>So to convert a numeric color value into hex, you can use
>>lcHexColor=Substr(Transform(lnColor,'@0'),5)
>>
>>
>>>We have the following code in our VFP 6.0 to send an email to MS Outlook in a specific font, size and color.
>>>
>>>=====
>>>
>>>loEmailItem.HTMLBody = [<html><font face = ]+ Slcrm.cbodyfont+[>];
>>> + [<font size = ] + lnsize + [> <font color = "="#ff0000">] + This.Parent.EdtNotes.Value;
>>> + [</font></html>]
>>>
>>>=====
>>>
>>>We have two problems:
>>>1) If we try to send font size 12 px, the email comes in at 36 px.
>>>i.e. lnsize="12px" or "14px" in our VFP
>>>
>>>2) For color we do not know how to convert color from numeric to hex.
>>>The color never matches what we are trying to send out.
Previous
Reply
Map
View

Click here to load this message in the networking platform