Page 1 of 1

Turn word wrap on/off for all open documents

Posted: 13 Feb 2010 11:23
by Rickard Johansson
Two scripts for ramon (and others who might be interested...).

Here are 2 simple scripts to turn word wrap on/off for all open documents.

Turn word wrap on:

Code: Select all

// Pascal script
// Turn on word wrap for all open documents.

// Global variables
var
   n: Integer;

// Enter code here
begin
   for n := 0 to MainApp.DocumentCount -1 do
   begin
      MainApp.DocumentIndex := n;
      Document.Wordwrap := True;
   end;
end.  
Turn word wrap off:

Code: Select all

// Pascal script
// Turn off word wrap for all open documents.

// Global variables
var
   n: Integer;

// Enter code here
begin
   for n := 0 to MainApp.DocumentCount -1 do
   begin
      MainApp.DocumentIndex := n;
      Document.Wordwrap := False;
   end;
end.  
Paste in the script editor and save. You should add them as tools and maybe add buttons to a tool bar.

Posted: 13 Feb 2010 11:24
by ramon
Wow... thank you Rickard!

Works great!