oWrite - RTF - File Paths

Michael Mantkowski michaelj at clientrax.com
Fri Jul 25 11:07:07 EDT 2014


Thanks Rudolf,

Your right.  Quick test revealed that I did indeed need to account for those
as well.

Mike

*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************



-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Rudolf
Bargholz
Sent: Friday, July 25, 2014 10:14 AM
To: OmnisDev List - English
Subject: AW: oWrite - RTF - File Paths

Hi Mike,

Keep in mind, that you will not only have to replace the "\", but also the
"{" and "}".


\    ->    \\    or    \'5c
{    ->    \{    or    \'7b
}    ->    \}    or    \'7d

Regards

Rudolf

-----Ursprüngliche Nachricht-----
Von: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] Im Auftrag von Michael
Mantkowski
Gesendet: Freitag, 25. Juli 2014 15:03
An: 'OmnisDev List - English'
Betreff: RE: oWrite - RTF - File Paths

Hi Geir,

Yes, that does work.  Thanks.  I can modify the code to replace any original
"\" with "\\".

Easy!

Mike

*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************



-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Geir Fjærli
Sent: Friday, July 25, 2014 8:38 AM
To: OmnisDev List - English
Subject: Re: oWrite - RTF - File Paths

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

_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com

_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list