Posts: 3
Threads: 1
Joined: Jan 2009
Hello,
I would like to define a key to print the contents of a text file, does anybody know a way to do this? Using the option run "file" "" "print" results in a text file, but I want to insert an (extensive) signature in Outlook.
Chantal
Posts: 12,072
Threads: 140
Joined: Dec 2002
Try this
Macro
str mySigFile="$desktop$\test.txt"
str s.getfile(mySigFile)
MailMessage "" "" "" "" s
It creates new message in your default email program with text from the file.
Or this
Macro
str mySigFile="$desktop$\test.txt"
str s.getfile(mySigFile)
s.setsel
It pastes text from the file in current window.
Posts: 3
Threads: 1
Joined: Jan 2009
Thanks, this works for .txt files. Is there also a way to do this with .doc files?
Posts: 12,072
Threads: 140
Joined: Dec 2002
Save the doc as htm, and use this macro to paste the file.
Macro
str mySigFile="$desktop$\test.htm"
str s.getfile(mySigFile)
str sh.format("Version:1.0[]StartHTML:00000033[]%s" s)
sh.setsel("HTML Format")
Posts: 3
Threads: 1
Joined: Jan 2009
Yes, that worked (I left out the string Version:1.0[]StartHTML:00000033). Many thanks!