oWrite - RTF - File Paths
Geir Fjærli
omnis at sunshinedata.com
Fri Jul 25 08:37:47 EDT 2014
Would simply doubling the backslashes work?
C:\\ClienTrax\\Pictures\\Pict.tif
So in the plain text message replace «\» with «\\».
Geir :)
25. juli 2014 kl. 14:11 skrev Michael Mantkowski <michaelj at clientrax.com>:
> Does anyone out there know RTF?
>
> I am using the code below to format a message in RTF that is then loaded
> into a oWrite field. It works fine unless someone tries to send a file path
> in the message. In that case a path of "C:\ClienTrax\Pictures\Pict.tif"
> displays as "C:.tif". (Quotes are not included in the actual message.)
>
> I am assuming that the backslashes are being interpreted as RTF coding
> instead of what they are in this case.
>
> I don't know if this is a RTF thing or an oWrite thing. Maybe paths with
> backslashes need to be delaminated some way?
>
> Anyone have any ideas?
>
>
> Calculate ivRTF_History as
> '{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss
> \fprq2\fcharset0 Arial;}}{\colortbl
> ;\red128\green128\blue128;}\viewkind4\uc1\pard\fi-620\li720\cf1\f0\fs18'
> Do replaceall(MsgMessage,chr(13),con('\par',chr(13,10))) Returns MsgMessage
> Calculate ivRTF_History as con(ivRTF_History,'\b [',MsgDateTime,']
> ',MsgFromScreen,':
> ',MsgSubject,'\b0\par',chr(13,10),MsgMessage,'\par',chr(13,10),'\par',chr(13
> ,10),' ')
> Calculate ivRTF_History as mid(ivRTF_History,1,len(ivRTF_History)-8)
> Calculate ivEditRef.$holdupdates as kTrue
> Do ivEditRef.$loaddata(ivRTF_History,kWriFmtRTF,kFalse) ;; Load Data in
> Read Only Mode
> Do ivEditRef.$editselectall()
> Calculate ivEditRef.$firstsel as ivEditRef.$lastsel
> Calculate ivEditRef.$vscroll as ivEditRef.$vscroll+1
>
>
> *********************************************************************
> Michael Mantkowski
> ClienTrax Software
> 1-614-875-2245
> *********************************************************************
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list