Read File maintain formatting?

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
gleff
Newbie
Posts: 4
Joined: Sat Jul 16, 2016 12:33 pm

Read File maintain formatting?

Post by gleff » Sun Jul 17, 2016 3:49 am

Hi All,

I want to read a text file into a variable, and then replace some text, and then re-save or copy to the clipboard the end result.

If I use Read File to read in the content of the text file which has formatting e.g., a text file that contains an email with paragraphs, signature, etc, will the result of the variable that I put it in maintain all that formatting, or will it just strip out everything?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Read File maintain formatting?

Post by Marcus Tettmar » Mon Jul 18, 2016 12:52 pm

Depends on the type of file. Obviously ReadFile won't work with a .doc file. If you use it against an RTF file it will read in all the RTF markup, so it will stay intact. A plain ANSI text file won't have formatting anyway.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

gleff
Newbie
Posts: 4
Joined: Sat Jul 16, 2016 12:33 pm

Re: Read File maintain formatting?

Post by gleff » Mon Jul 18, 2016 7:57 pm

Awesome. Thanks Marcus..

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts