Lescasse Consulting
 Home    Company    News    Prices    Download    Buy    Forums   
Read Me
Buy
Forums
Resume
AntiSpam 1.2
wBackup 1.11
NetAccess 2.0
Visual APL 1.0 
APL+Win 8.0 
APL+Win Products 
APL+Win Objects™ 
APL+Win Training 
APL+Web Services
APL+Web Component 
APL+ History
Dyalog.Net Tutorial
Conferences 
Powerpoint
White Papers
Web Hosting
References
Links
 
APL+Win Objects™ 6.0

TADO5
TADO5 Tutorial
TAPLDraw5
TAPLEdit5
TAPLSession5
TAbale5
TAboutBox5
TAccess5
TAgent5
TBlatMail5
TButton5
TCDO5
TCRC5
TCancelButton5
TCheck5
TCheckGroup5
TChildForm5
TChooseColor5
TChooseFont5
TClipBoard5
TClock5
TCodeStats5
TColors5
TCombo5
TComboDrive5
TComboFilter5
TComboList5
TComboTree5
TCommandBar5
TCommandButton5
TControlClass5
TCueCard5
TDHTML5
TDHTMLEditor5
TDateTime5
TDateTimeFr5
TDates5
TDemoHandlers5
TDisplay5
TDOS5
TDualSelect5
TEdit5
TEditAmount5
TEditDir5
TEditEnter5
TEditFile5
TEditGrid5
TEditList5
TEditListview5
TEditMenu5
TEditNum5
TEditSelect5
TEditSpin5
TEmail5
TError5
TExampleForm5
TExcel5
TExcel5 Tutorial
TFindReplace5
TFOne5
TFTP5
TFTP5 Tutorial
TFileCompare5
TFileMenu5
TFileMenuDef5
TFlatButton5
TForm5
TFormClass5
TFormEditor5
TFrame5
TGetDir5
TGif5
TGifForm5
TGifWb5
TGoMenu5
TGraphX5
TGrid5
TGridDisplay5
TGridPrint5
TGUID5
THLine5
THTML5
THTML5 Tutorial
THTTP5
THelp5
THelpMenu5
TImagelist5
TInfo5
TIniFile5
TInstall5
TInternet5
TJpg5
TJpgWb5
TLabel5
TList5
TListview5
TLock5
TLogs5
TMAPI5
TMath5
TMDIForm5
TMSOutlook5
TMaskEdit5
TMedia5
TMenu5
TMessage5
TModalCall5
TMsgBox5
TNavigator5
TNetwork5
TNonVisualClass5
TODBC5
TOKButton5
TObject5
TOpenFile5
TOption5
TOptionGroup5
TOutlook5
TOutlookMail5
TOWCSpread5
TPDF5
TPFKeys5
TPage5
TPassword5
TPicture5
TPing5
TPopupMenu5
TPowerpoint5
TPowerpoint5 Tutorial
TPrinter5
TProgress5
TProgressDlg5
TQuestion5
TRegistry5
TRegistryKey5
TResource5
TRichEdit5
TSPX5
TSQLDMO5
TScheduler5
TScroll5
TSelector5
TSpinner5
TSplitter5
TStatus5
TStopWatch5
TTest5
TTestError5
TTextFile5
TTimer5
TTip5
TTipForm5
TTLI5
TToolBar5
TToolbox5
TToolsMenu5
TTrackbar5
TTranslate5
TTree5
TVLine5
TViewMenu5
TWebBrowser5
TWebServer5
TWebSite5
TWebSiteNet5
TWinMenu5
TWord5
TYesNo5
    Visits:  3982 (36 on line) Last Update: Dec 5, 2003  
    TWord5    Printer Friendly  
 
Description   Inheritance   Example   Properties   Methods
 
 Description

The TWord5 Object uses the Microsoft Word.Application object to programmatically use Word from APL+Win It contains methods and properties to open/create Word documents, add/replace paragraphs and tables, add/replace headers and footers, search and replace text, etc.

See also: TExcel5 TPowerpoint5

Description   Inheritance   Example   Properties   Methods
 
 Inheritance

Inherits from:  TObject5

Description   Inheritance   Example   Properties   Methods
 
 Example
 
 

The above example was generated by the following APL+Win Objects™ code:


      'wd'Œwi'*Create' 'TWord5'
      'wd'Œwi'visible'1
      'wd'Œwi'ontop'1
      'wd'Œwi'AddDocument'
      'wd'Œwi'TypePar'3
      'wd'Œwi'Indent'7
      'wd'Œwi'*Set'('fontname' 'Arial')('fontsize'13)('fontbold'1)
      'wd'Œwi'TypeTextPars' '  '  '' '' '' ',  ' '' ''
      'wd'Œwi'*Set'('fontname' 'Times New Roman')('fontsize'12)('fontbold'0)('fontsmallcaps'0)
      'wd'Œwi'Outdent'7
      'wd'Œwi'TypePar'3
      'wd'Œwi'*Set'('fontname' 'Arial')('fontsize'14)('fontbold'1)('fontsmallcaps'1)
      'wd'Œwi'Alignment' 'Center'
      'wd'Œwi'TypeTextPar' 'Invoice #1292'
      'wd'Œwi'Alignment' 'Left'
      'wd'Œwi'*Set'('fontname' 'Times New Roman')('fontsize'12)('fontbold'0)('fontsmallcaps'0)
      table„1 5½'Part' 'Product Name' 'Qty' 'Amount' 'Total'
      table„table®'APLWin52' 'APL+Win 5.2 Full System (Entreprise Edition)'8 2500(8×2500)
      table„table®'APLWinObj50' 'APL+Win Objects 6.0 (Full Collection)'1 3995(1×3995)
      table„table®'TADO5' 'TADO5 Object (ODBC Collection)'1 395(1×395)
      table„table®'TExcel5' 'TExcel5 Object'1 495(1×495)
      table„table®'' '' 'Shipping' ''90
      table„table®'' '' 'Taxes' '19.6%' (.196×+/table[2 3 4 5 6;5])
      table„table®'' '' 'Total Due' '' (+/table[2 3 4 5 6 7;5])
      table[2 3 4 5;3]„DEB¨Œsplit'I5'Œfmt table[2 3 4 5;3]
      table[2 3 4 5;4]„DEB¨Œsplit'CF10.2'Œfmt table[2 3 4 5;4]
      table[2 3 4 5 6 7 8;5]„DEB¨Œsplit'CF10.2'Œfmt table[2 3 4 5 6 7 8;5]
      'wd'Œwi'AddTable'table
      'wd'Œwi'AutoFormat'13
      'wd'Œwi'*Set'('Right' 'Cell'2)('Select' 'Column')('Alignment' 'Right')'Unselect'
      'wd'Œwi'*Set'('Right' 'Cell'1)('Select' 'Column')('Alignment' 'Right')'Unselect'
      'wd'Œwi'*Set'('Right' 'Cell'1)('Select' 'Column')('Alignment' 'Right')'Unselect'
      'wd'Œwi'*Set'('Left' 'Cell'4)('Down' 'Line'5)
      'wd'Œwi'*Set'('Right' 'Character'2 1)('Down' 'Line'2 1)   © selects cells (6,1) to (8,2)
      'wd'Œwi'Merge'
      'wd'Œwi'*Set'('Texture'0)('BackColor'(255 255 255))('BorderColor'(255 255 255))
      Œex'table'
 
Description   Inheritance   Example   Properties   Methods
 
 Properties
 
caption    
Description:  Get or set the Word window caption 
Syntax:  {res„'} 'obj' Œwi 'caption' {title} 
caption:  any text string 
Example: 
      'obj' Œwi 'caption' 'Invoice #1292' 
class    
Description:  Return current object class 
Syntax:  class„'obj' Œwi 'class' 
help    
Example: 
0 0½'wd' Œwi '*Create' 'TWord5' 
'wd' Œwi 'visible'1 
'wd' Œwi 'ontop'1 
'wd' Œwi 'AddDocument' 
'wd' Œwi 'TypePar'3 
'wd' Œwi 'Indent'7 
'wd' Œwi '*Set' ('fontname' 'Arial') ('fontsize'13) ('fontbold'1) 
'wd' Œwi 'TypeTextPars' '<Salut> <FirstName> <LastName>'  '<Company>' '<Addr1>' '<Addr2>' '<City>, <State> <ZipCode>' '' '<Date>' 
'wd' Œwi '*Set' ('fontname' 'Times New Roman') ('fontsize'12) ('fontbold'0) ('fontsmallcaps'0) 
'wd' Œwi 'Outdent'7 
'wd' Œwi 'TypePar'3 
'wd' Œwi '*Set' ('fontname' 'Arial') ('fontsize'14) ('fontbold'1) ('fontsmallcaps'1) 
'wd' Œwi 'Alignment' 'Center' 
'wd' Œwi 'TypeTextPar' 'Invoice #1292' 
'wd' Œwi 'Alignment' 'Left' 
'wd' Œwi '*Set' ('fontname' 'Times New Roman') ('fontsize'12) ('fontbold'0) ('fontsmallcaps'0) 
table„1 5½'Part' 'Product Name' 'Qty' 'Amount' 'Total' 
table„table®'APLWin52' 'APL+Win 5.2 Full System (Entreprise Edition) '8 2500(8×2500) 
table„table®'APLWinObj50' 'APL+Win Objects 6.0 (Full Collection) '1 3995(1×3995) 
table„table®'TADO5' 'TADO5 Object (ODBC Collection) '1 395(1×395) 
table„table®'TExcel5' 'TExcel5 Object'1 495(1×495) 
table„table®'' '' 'Shipping' ''90 
table„table®'' '' 'Taxes' '19.6%' (.196×+/table[2 3 4 5 6;5]) 
table„table®'' '' 'Total Due' '' (+/table[2 3 4 5 6 7;5]) 
table[2 3 4 5;3]„DEB¨Œsplit'I5' Œfmt table[2 3 4 5;3] 
table[2 3 4 5;4]„DEB¨Œsplit'CF10.2' Œfmt table[2 3 4 5;4] 
table[2 3 4 5 6 7 8;5]„DEB¨Œsplit'CF10.2' Œfmt table[2 3 4 5 6 7 8;5] 
'wd' Œwi 'AddTable'table 
'wd' Œwi 'AutoFormat'13 
'wd' Œwi '*Set' ('Right' 'Cell'2) ('Select' 'Column') ('Alignment' 'Right') 'Unselect' 
'wd' Œwi '*Set' ('Right' 'Cell'1) ('Select' 'Column') ('Alignment' 'Right') 'Unselect' 
'wd' Œwi '*Set' ('Right' 'Cell'1) ('Select' 'Column') ('Alignment' 'Right') 'Unselect' 
'wd' Œwi '*Set' ('Left' 'Cell'4) ('Down' 'Line'5) 
'wd' Œwi '*Set' ('Right' 'Character'2 1) ('Down' 'Line'2 1)   © selects cells (6,1) to (8,2) 
'wd' Œwi 'Merge' 
'wd' Œwi '*Set' ('Texture'0) ('BackColor' (255 255 255)) ('BorderColor' (255 255 255)) 
0 0½Œex'table' 
margins    
Description:  Get or Set the margins property 
Syntax: 'object' Œwi 'margins' {margins} 
margins:  6-element integer vector representing 
          6 margins: left,right,top,bottom,header,footer 
Example: 
      'ww' Œwi 'margins'1.7 1.7 1.7 1.7 1 0.5 
noredraw    
Description:  Enables or disables screen updating to accelerate the Word initialisation process 
Syntax:  {res„'} 'obj' Œwi 'noredraw' {boolean} 
boolean:  a boolean scalar 
Example: 
      'obj' Œwi 'noredraw'1 
ontop    
Description:  Get or Set the ontop property specifying if Excel must stay on top of all other windows or not 
Syntax: {boolean'} 'obj' Œwi 'ontop'boolean 
    or: {boolean'} 'obj' Œwi 'ontop'documentname boolean 
boolean:  1=make the TWord5 window topmost; 0=don't 
Example: 
      'ww' Œwi 'ontop'1 
      'ww' Œwi 'ontop' 'Document3'1 
orientation    
Description:  Get or Set the xOrientation Word object property 
Syntax:  {boolean}„object Œwi 'orientation' {boolean} 
boolean: 0=portrait; 1=landscape 
Example: 
      'obj' Œwi 'orientation'1 
valign    
Description:  Get or Set the xVerticalAlignment Word object property 
Syntax:  {boolean}„'obj' Œwi 'valign' {boolean} 
visible    
Description:  Make the Word window visible or not 
Syntax:  {boolean}„object Œwi 'visible' {boolean} 
boolean: 0=not visible; 1=visible 
Example: 
      'obj' Œwi 'visible'1 
Description   Inheritance   Example   Properties   Methods
 
 Methods
 
ActivateDoc    
Description:  Activate a specific document 
Syntax:  doc„'obj' Œwi 'ActivateDoc'document 
document:  document number or name 
doc:  document name if success or '' otherwise 
Example: 
      'wd' Œwi 'ActivateDoc 3 
     or: 
      'wd' Œwi 'ActivateDoc 'Document1' 
r„Document Name if success null otherwise 
***** TO BE TESTED 
ActiveDoc    
Description:  Returns the ActiveDocument or 0 if none 
Syntax:  res„'obj' Œwi 'ActiveDoc' 
res:  currently active document name 
Example: 
      'ww' Œwi 'ActiveDoc' 
***** TO BE TESTED 
AddDocument    
Description:  Add a new document optionnally specifying a template 
Syntax:  'obj' Œwi 'AddDocument' {template} 
template:  full name of a .dot template file 
Example: 
      'obj' Œwi 'AddDocument' 
AddHeaderFooter    
Description:  Add Header or Footer sections 
Syntax:  'obj' Œwi 'AddFooter'headerfooter headerfooterarray 
headerfooter:  'Headers' or 'Footers' 
headerfooterarray:  a Nx3 nested array 
      [;1]  (left text) 'fontname'fontsize bold italic 
      [;2]  (centered text) 'fontname'fontsize bold italic 
      [;3]  (right text) 'fontname'fontsize bold italic 
Text may contain embedded field requests.  Each field request is 
a VBA keyword prefixed by #. 
Allowed keywords are: 
      #Author    #CreateDate    #Date      #FileName  #FileSize      #LastSavedBy 
      #NumChars  #NumPages      #NumWords  #Page      #RevisionNum 
      #Section   #SectionPages  #Time      #UserName  #UserInitials 
Example: 
      footer4 3½›'' 
      footer[1;]('#FileName' 'Verdana'8 1 0) '' '' 
      footer[2;]('Left Text' 'Verdana'8 0 0) ('Centered Text' 'Arial'12 1 1) ('Right Text' 'Verdana'8 0 0) 
      footer[3;]('This is a long comment which spans over left, centered and right text' 'Arial'6 0 0) '' '' 
      footer[4;]'' ('Page #Page of #NumPages' 'Arial'10 1 0) '' 
      'wd' Œwi 'AddHeaderFooter' 'Footers'footer 
AddHyperlink    
Description:  arg WD_AddHyperlink rng 
Add Hyperlink to the end of the rng 
Syntax:  'obj' Œwi 'AddHyperlink'range address {subaddress screentip texttodisplay} 
range:  a range 
        if range is '' uses selection 
address:  an URL or a file name 
subaddress:  '' 
screentip:  a tip for the link 
texttodisplay:  the text for the link 
Examples: 
    'wd' Œwi 'AddHyperlink' '' 'http://www.openhere.com' '' 'OpenHere' 'Link to OpenHere' 
    'wd' Œwi 'AddHyperlink' '' 'C:\My Documents\LinkDoc.Doc' '' 'Link Explanation' 
Inspired from APL2000 
AddSection    
Description:  Adds a new section to the end of the Document (generates a New Page) 
Syntax:  'obj' Œwi 'AddSection' 
Example: 
      'ww' Œwi 'AddSection' 
AddTable    
Description:  Adds a table at selection point 
Syntax:  'obj' Œwi 'AddTable'nestedarray 
nestedarray:  a nested matrix 
Note: Inspired from APL2000 
See also: method <Table> 
Requires:  ClipFmt 
Example: 
      'wd' Œwi 'AddTable' ((Œsplit'C' Œnl 3),[1.5]Œsize 'C' Œnl 3) 
Alignment    
Description:  Get or Set a paragraph alignment 
Syntax: {res„'} 'obj' Œwi 'Alignment' {type} 
type:  'Left', 'Right', 'Center' or 'Just' 
res: 
Example: 
      'ww' Œwi 'Alignment' 'Just' 
AutoFormat    
Description:  Indicate which table format to use 
Syntax:  'obj' Œwi 'AutoFormat'formatno 
formatno:  an integer number representing the format to apply (0=none to 42) 
Example: 
      'ww' Œwi 'AutoFormat'5 
BackColor    
Description:  Get or Set the background color for a frame 
Syntax:  'obj' Œwi 'BackColor'color 
color:  a character string representing a color (example: 'Red') 
   or:  a color number (0 to 16) 
   or:  a color expresses as 256ƒR G B 
Example: 
      'ww' Œwi 'BackColor' 'Red' 
Note:  see method <Colors> to know about color names and numbers 
Border    
Description:  Get or Set the Border color 
Syntax:  'obj' Œwi 'BorderColor'color 
color:  a character string representing a color (example: 'Red') 
   or:  a color number (0 to 16) 
   or:  a color expresses as 256ƒR G B 
Example: 
      'ww' Œwi 'BorderBackColor' 'Red' 
Note:  see method <Colors> to know about color names and numbers 
BorderColor    
Description:  Get or Set the Border color 
Syntax:  'obj' Œwi 'BorderColor'color 
color:  a character string representing a color (example: 'Red') 
   or:  a color number (0 to 16) 
   or:  a color expresses as 256ƒR G B 
Example: 
      'ww' Œwi 'BorderBackColor' 'Red' 
Note:  see method <Colors> to know about color names and numbers 
BorderLineStyle    
Description:  Get or Set the line style for a frame 
Syntax: 'obj' Œwi 'BorderLineStyle'type 
Example: 
      'obj' Œwi 'BorderLineStyle' 'Double' 
BorderLineWidth    
Description:  Get or Set the border line width 
Syntax: 'obj' Œwi 'BorderLineWidth'width 
width:  one of: 2 4 6 8 12 18 24 36 48 
BorderShadow    
Description:  Get or Set the Border shadow 
Syntax: 'obj' Œwi 'Shadow' {boolean} 
boolean:  a boolean scalar 
Example: 
      'ww' Œwi 'BorderShadow'1 
Break    
Description:  Inserts a Break at the insertion point specifying the Break type 
Syntax: 'obj' Œwi 'Break'type 
type: break type, one of: 
      2=Next Page 
      3=Continuous 
      4=Even Page 
      5=Odd Page 
      6=Line 
      7=Page 
      8=Column 
Example: 
      'ww' Œwi 'Break' 'Page' 
Breaks    
Description:  Returns a list of available breaks or the Break number for a given Break name 
Syntax:  {res}„'obj' Œwi 'Breaks' {name} 
name: a Break name, one of: 
      2=Next Page 
      3=Continuous 
      4=Even Page 
      5=Odd Page 
      6=Line 
      7=Page 
      8=Column 
res:  the corresponding Break number 
 or:  a 2-column nested matrix of all possible Break names and numbers 
Example: 
      'ww' Œwi 'Breaks' 
      'ww' Œwi 'Breaks' 'Even Page' 
Bullets    
Description:  Add a bullet list 
Syntax:  'obj' Œwi 'Bullets' 
Example: 
      'ww' Œwi 'Bullets' 
**** TO BE TESTED 
Cm2Points    
Description:  Converts Centimeters to Points 
Syntax:  points„'obj' Œwi 'Cm2Points'centimeters 
centimeters:  an numeric scalar or vector representing centimeters 
points:  the same distance expressed in points 
Colors    
Description:  Return the list of available colors 
Syntax:  {res„'} 'obj' Œwi 'Colors' {color} 
color: color name or color number 
   1=Black 
   2=Blue 
   3=Cyan 
   4=LightGreen 
   5=Pink 
   6=Red 
   7=Yellow 
   8=White 
   9=Navy 
   10=Teal 
   11=Green 
   12=Purple 
   13=DarkRed 
   14=Maroon 
   15=Gray 
   16=LightGray 
Note: if color is omitted, returns the list of available colors 
ColumnWidth    
Description:  Get or Set the selected column widths 
Syntax:  {width„'} 'obj' Œwi 'ColumnWidth' {width} 
width:  the column width expressed in Centimeters 
CreateObjects    
Description:  Create a bunch of useful objects (used when creating a new document: see <AddDocument>) 
Syntax:   'obj' Œwi 'CreateObjects' 
Type               Object 
---------------    --------------------- 
Selection       -> :sel 
ActiveWindow    -> :wnd 
View            -> :view 
Font            -> :font 
ParagraphFormat -> :parformat 
TabStops        -> :tabstops 
Shading         -> :shading 
Tables          -> :tables 
Fields          -> :fields 
Borders         -> :borders 
Item Border     -> :bordertop 
Item Border     -> :borderbottom 
Item Border     -> :borderright 
Item Border     -> :borderleft 
Display    
Description:  Allows to display the Document, Header, Footer or Notes 
Syntax: {res„'} 'obj' Œwi 'Display' {typeofdoc} 
typeofdoc:  numeric or character value representing the desired type of display 
            0=Document 
            1=OddHeader 
            2=Header1 
            3=EvenHeader 
            4=OddFooter 
            5=Footer1 
            6=EvenFooter 
            7=BottomNote 
            8=EndNote 
            9=Header 
           10=Footer 
            if typeofdoc is omitted, returns the currently displayed type of doc 
Note:  document must be in Page mode to access Headers and Footers 
Example: 
      'ww' Œwi 'Display' 'Footer' 
Doc2Pdf    
Description:  Converts a .Doc document to .Pdf under program control 
Syntax:  'obj' Œwi 'Doc2Pdf'wordfilename 
wordfilename:  name of a Word document 
Note: a document with the same name but converted to PDF 
is created in the same directory.  This function requires that 
you have installed the PDF995 driver (http://www.pdf995.com) 
Example: 
      Doc2Pdf'c:\temp\sample.doc' 
creates a c:\temp\sample.pdf PDF document 
Documents    
Description:  Return the names all currently opened Word documents 
Syntax:  docs„'obj' Œwi 'Documents' 
docs:  nested vector of all currently opened document names 
Example: 
      'ww' Œwi 'Documents' 
Down    
Description:  Moves cursor Down selecting (or not selecting) text 
Syntax:   'obj' Œwi 'Down'unit {number} {select} 
unit:     'Paragraph' 'Line' 'Screen' or 'Window' 
       or      4,        5,     7     or    11 
number:   (optional, default=1) number of units to pass 
select:   (optional, default=0) 0=do not select text, 1=select text 
Example: 
      'obj' Œwi 'Down' 'Line'3               © move 2 paragraphs Up without selecting them 
Possible units are: 
      •(Œwi 'Units')[4 5 7 11;] 
End    
Description:  Move cursor to end of Line or of Document 
Syntax:   res„'obj' Œwi 'End'unit select 
unit:     'Line' or 'Document' 
select:   (optional, default=0) 0=do not select text, 1=select text 
res: ***** 
Example: 
      'ww' Œwi 'End' 'Document'0             © move to end of document 
All possible units are: 
      •(Œwi 'Units')[5 6;] 
Excel    
Description:  Adds an Excel sheet at the insertion point 
Syntax:  'obj' Œwi 'Excel'file link 
file:  complete name for the Excel file (compulsory) 
link:  0=incorporate 1=just link (optional, default:0) 
Example:  
Field    
Description:  Inserts a new field at the insertion point according to the specified Field Type 
Syntax:  'obj' Œwi 'Field'type 
type: field type.  One of: 
Fields    
Description:  Return all the possible field types or return the field number for a given field name 
Syntax:  'obj' Œwi 'Fields' {fieldtype} 
fieldtype: fieldtype name or fieldtype number 
FontAllCaps    
Description:  Get or Set the font AllCaps property 
Syntax:  {boolean}„'object' Œwi 'FontAllCaps' {boolean} 
boolean:  a boolean scalar 
Example: 
      'ww' Œwi 'FontAllCaps'1 
FontBold    
Description:  Get or set the font bold attribute for the current selection 
Syntax:  {res„'} 'obj' Œwi 'fontbold' {boolean} 
boolean:  a boolean scalar 
Example: 
      'ww' Œwi 'fontbold'1 
FontColor    
Description:  Get or Set the Font color for the selected range cells 
Syntax:  {color„'} 'obj' Œwi 'fontcolor' {color} 
color:  (256ƒred green blue) [red,green,blue between 0 and 255] 
    or  (red green blue)" 
Example: 
      'ee' Œwi 'fontcolor'255 0 204 
FontItalic    
Description:  Get or Set the fontitalic property for the selected range 
Syntax:  {boolean„'} 'obj' Œwi 'fontitalic' {boolean} 
boolean:  1=make the font italics  0=don't 
Example: 
      'ee' Œwi 'fontitalic'1 
FontName    
Description:  Get or Set the font for the selected range 
Syntax:  {name„'} 'obj' Œwi 'fontname' {name} 
name:  a character string (the font name) 
Example: 
      'ee' Œwi 'fontname' 'Arial' 
FontSize    
Description:  Get or Set the font size for the selected range 
Syntax:  {size„'} 'obj' Œwi 'fontsize' {size} 
size:  an integer (the font size) 
Example: 
      'ee' Œwi 'fontsize'14 
FontSmallCaps    
Description:  Get or Set the font SmallCaps property 
Syntax:  {boolean}„'object' Œwi 'FontSmallCaps' {boolean} 
boolean:  a boolean scalar 
Example: 
      'ww' Œwi 'FontSmallCaps'1 
FontSpacing    
Description:  Get or Set the font spacing for the selected range 
Syntax:  {size„'} 'obj' Œwi 'fontspacing' {spacing} 
spacing:  a decimal value between 0 and 2 
Example: 
      'ee' Œwi 'fontspacing'.5 
FontSub    
Description:  Get or Set the font SubScript property 
Syntax:  {boolean}„'object' Œwi 'fontsub' {boolean} 
boolean:  a boolean scalar 
Example: 
      'ww' Œwi 'fontsub'1 
FontSuper    
Description:  Get or Set the font SuperScript property 
Syntax:  {boolean}„'object' Œwi 'fontsuper' {boolean} 
boolean:  a boolean scalar 
Example: 
      'ww' Œwi 'fontsuper'1 
FontUnderline    
Description:  Get or Set the FontUnderline property for the selected range 
Syntax:  {value„'} 'obj' Œwi 'fontunderline'value 
value:  ¯4142=xlUnderlineStyleNone 
            2=xlUnderlineStyleSingle 
        ¯4119=xlUnderlineStyleDouble 
            4=xlUnderlineStyleSingleAccounting 
            5=xlUnderlineStyleDoubleAccounting 
Example: 
      'ee' Œwi 'fontunderline'2 
GetDocument    
Description:  Get text data from active document 
Syntax:  text„'obj' Œwi 'GetDocument' 
text:  a text vector 
Example: 
      'ww' Œwi 'GetDocument' 
GetNextLine    
Description:  Get the next line of text data from active document 
Syntax:  text„'obj' Œwi 'GetNextLine' {N} 
N:  number of lines to get (default=1) 
Example: 
      'ww' Œwi 'Start' 'Document' 
      'ww' Œwi 'GetNextLine' 
Image    
Description:  Inserts an image at the insertion point 
Syntax:  'object' Œwi 'Image'image link save 
image:  complete name of image file (required) 
link:  0=incorporate or 1=just link (optional, default=0) 
save:  0=do not save or 1=save      (optional, default=1) 
Indent    
Description:  Allows to Indent the currently selected paragraphs by a number of tabs 
Syntax:  'object' Œwi 'Indent'N 
N:  number of Tabs to insert before paragraph 
Info    
Description:  Returns Information about the specified range 
Syntax:  result„'obj' Œwi 'Info'args 
args:  4=wdNumberOfPagesInDocument 
      33=wdHeaderFooterType 
result: 
    ¯1=no header 
     0 (zero) Even page header 
     1 Odd page header (or the only header, if there aren't odd and even headers) 
     2 Even page footer 
     3 Odd page footer (or the only footer, if there aren't odd and even footers) 
     4 First page header 
     5 First page footer 
   100=wdZoomPercentage 
Information    
Description:  Allows to get a set of information (read-only properties) about the current object 
Syntax: 'obj' Œwi 'Information' 
Example: 
      'ww' Œwi 'Information' 
Left    
Description:  Moves cursor to the left selecting (or not selecting) text 
Syntax:   'obj' Œwi 'Left'unit{number}{select} 
unit:     'Character' 'Word' 'Sentence' 'Cell' (if in a table) or 'Item' 
       or      1,        2,       3,      12                  or   16 
number:   (optional, default=1) number of units to pass 
select:   (optional, default=0) 0=do not select text, 1=select text 
Exemple: 
      'ww' Œwi 'Left' 'Word'3 1              © move to the 3rd word to the left, selecting 3 words 
All possible units are: 
      •(Œwi 'Units')[1 2 3 12 16;] 
Note: a dot (.) at the end of a word count as one word 
LineStyle    
Description:  Return the LineStyle number corresponding to a LineStyle name 
Syntax:  'obj' Œwi 'LineStyle'name 
name:  one of: 
        wdLineStyleNone                   0 
        wdLineStyleSingle                 1 
        wdLineStyleDot                    2 
        wdLineStyleDashSmallGap           3 
        wdLineStyleDashLargeGap           4 
        wdLineStyleDashDot                5 
        wdLineStyleDashDotDot             6 
        wdLineStyleDouble                 7 
        wdLineStyleTriple                 8 
        wdLineStyleThinThickSmallGap      9 
        wdLineStyleThickThinSmallGap     10 
        wdLineStyleThinThickThinSmallGap 11 
        wdLineStyleThinThickMedGap       12 
        wdLineStyleThickThinMedGap       13 
        wdLineStyleThinThickThinMedGap   14 
        wdLineStyleThinThickLargeGap     15 
        wdLineStyleThickThinLargeGap     16 
        wdLineStyleThinThickThinLargeGap 17 
        wdLineStyleSingleWavy            18 
        wdLineStyleDoubleWavy            19 
        wdLineStyleDashDotStroked        20 
        wdLineStyleEmboss3D              21 
        wdLineStyleEngrave3D             22 
        wdLineStyleOutset                23 
        wdLineStyleInset                 24 
LineStyles    
Description:  List all possible border lines styles 
Syntax:  res„'obj' Œwi 'LineStyles' 
res:  2-column nested matrix of possible line styles 
Example: 
      'ww' Œwi 'LineStyles' 
Load    
Description:  Open an existing Word document 
Syntax:  {result„'} 'obj' Œwi 'Open'filename 
filename:  a .DOC full document path name 
Example: 
      'ww' Œwi 'Open' 'c:\my documents\test.doc' 
Merge    
Description:  Merge selected cells 
Syntax:  'obj' Œwi 'Merge' 
Example: 
      'ww' Œwi 'Merge' 
New     Description: Create a new instance of TWord5
Example:
      'obj' Œwi '*Create' 'TWord5'

Null2Missing    
Description:  Convert nulls in arg to VBA missing values 
Syntax:  nested„'obj' Œwi 'Null2Missing'nestedarray 
nestedarray:  array whose elements may be empty 
nested:  array with empty elements replaced by VBA missing values 
Example: 
      'ww' Œwi 'Null2Missing' 'Word' '' 'Document' 
Note: Nulls may be either Ð or '' 
Numbers    
Description:  Add a numbered list at the insertion point 
Syntax:  'obj' Œwi 'Numbers' 
Example: 
      'ww' Œwi 'Numbers' 
Numbers2    
Description:  Adds a numbered list of type: 1) at the insertion point 
Syntax:  'obj' Œwi 'Numbers2' 
Example: 
      'ww' Œwi 'Numbers2' 
Outdent    
Description:  Allows to Outdent the currently selected paragraphs by a number of tabs 
Syntax:  'object' Œwi 'Outdent'N 
N:  number of Tabs to insert before paragraph 
Example: 
      'ww' Œwi 'Outdent'3 
PageSetup    
Description:  Change Printer Page Setup parameters 
Syntax: 'obj' Œwi 'PageSetup' ('Param1'values1) ('Param2'values2)etc... 
ParamX: one of: 'margins', 'center' or 'orientation' 
        margins  6 values in cm (left, right, top, bottom, header, footer 
        center   1 value 1=vertically centered; 0=notvertically centered 
        orientation  0=portait, 1=landscape 
Example: 
      'ww' Œwi 'PageSetup' ('margins'1 1 1 1 0 0) ('center'1) ('orientation'1) 
Notes: Non implemented yet: 
   DifferentFirstPageHeaderFooter 
   FirstPageTray 
   Gutter 
   LineNumbering 
   MirrorMargins 
   OddAndEventPagesHeaderFooter 
   OtherPagesTray 
   PageHeight & PageWidth 
   PaperSize 
   SectionStart 
   SuppressEndNotes 
   TextColumns (...objet) 
Paragraph    
Description:  Add one or more paragraphs at the insertion point 
Syntax:  'obj' Œwi 'TypeParagraphs'pars 
pars:  a positive integer (to insert <pars> empty paragraph) 
  or:  a nested vector of text vectors (to insert real paragraphs) 
Example: 
      'ww' Œwi 'TypeParagraphs'4 
      'ww' Œwi 'TypeParagraphs' 'This is my first paragraph.' 'This is the second one' 'And finally the third one!' 
Note:  'Paragraph' is retained for upward compatibility with TWord 
Print    
Description:  Prints the currently active document       © LES30jan01 © method added 
Syntax:  'obj' Œwi 'PrintOut' 
Example: 
      'ww' Œwi 'Print' 
Quit    
Description:  Close Word application with or without saving 
Syntax:  'obj' Œwi 'Quit' {save} 
save:  ¯2(=query) ¯1(=save) or 0(=dontsave) 
Example: 
      'ww' Œwi 'Quit' 
Replace    
Description:  Replaces a character string by another in a document in current selection' 
Syntax: 'object' Œwi 'Replace' old new {optional} 
old:  string to be replaced 
new:  replacement string 
optional: a vector of 1 or more optional parameters 
          optional[1]  Replace mode (0=ReplaceNone, 1=ReplaceOne, 2=ReplaceAll) 
          optional[2]  MatchCase (1 or 0) 
          optional[3]  MatchWholeWord (1 or 0) 
          optional[4]  MatchWildCards (1 or 0) 
          optional[5]  MatchSoundsLike (1 or 0) 
          optional[6]  MatchAllWordForms (1 or 0) 
          optional[7]  Forward (1 or 0) 
          optional[8]  Wrap (1 or 0) 
          optional[9]  Format (1 or 0) 
Note: use Œwi 'SelectDocument' to select the entire document 
Example: 
      'ww' Œwi 'Replace' ***** ADD EXAMPLE HERE 
ReplaceAll    
Description:  Replaces a string by another in the whole document 
Syntax:  'obj' Œwi 'Replace' old new {optional} 
old:  string to be replaced 
new:  replacement string 
optional: a vector of 1 or more optional parameters 
          optional[1]  Replace mode (0=ReplaceNone, 1=ReplaceOne, 2=ReplaceAll) 
          optional[2]  MatchCase (1 or 0) 
          optional[3]  MatchWholeWord (1 or 0) 
          optional[4]  MatchWildCards (1 or 0) 
          optional[5]  MatchSoundsLike (1 or 0) 
          optional[6]  MatchAllWordForms (1 or 0) 
          optional[7]  Forward (1 or 0) 
          optional[8]  Wrap (1 or 0) 
          optional[9]  Format (1 or 0) 
Example: 
      'ww' Œwi 'ReplaceAll' ***** ADD EXAMPLE HERE 
Right    
Description:  Moves cursor to the right selecting (or not selecting) text 
Syntax:   'obj' Œwi 'Right'unit{number}{select} 
unit:     'Character' 'Word' 'Sentence' 'Cell' (if in a table) or 'Item' 
       or      1,        2,       3,      12                  or   16 
number:   (optional, default=1) number of units to pass 
select:   (optional, default=0) 0=do not select text, 1=select text 
Exemple: 
      'ww' Œwi 'Right' 'Word'3 1              © move to the 3rd word to the right, selecting 3 words 
All possible units are: 
      •(Œwi 'Units')[1 2 3 12 16;] 
Note: a dot (.) at the end of a word count as one word 
SaveAs    
Description:  Save the active Word Document 
Syntax:  'obj' Œwi 'Save' {filename} 
filename:  a nested vector possibily containing only a file name 
           If <filename> contains more than 1 element, here are their meanings: 
           filename[1]  FullPath\FileName 
           filename[2]  FileFormat 
                         0=Document      1=Template           2=Text  3=TextLineBreaks 
                         4=DosText       5=DosTextLineBreaks  6=RTF 
                         7=Encoded Text  8=HTML 
           filename[3]  LockComments 
           filename[4]  Password 
           filename[5]  Add to MRU files 
           filename[6]  WritePassword 
           filename[7]  ReadOnly Recommended 
           filename[8]  Embedded TrueTypeFonts 
           filename[9]  SaveNativePictureFormat 
Note: if <filename> is omitted do "Save" else "SaveAs" 
Example: 
      'ww' Œwi 'Save' 'c:\temp\invoice1292.doc' 
Select    
Description:  Selects a line, a column or the entire table based on the cursor position 
Syntax: 'object' Œwi 'Select'type 
type:  'Line', 'Column' or 'Table' 
Example: 
      'ww' Œwi 'Select' 'Line' 
Selection    
Description:  Returns the selection Object 
Syntax:  'obj' Œwi 'Selection' 
Example: 
      'ww' Œwi 'Selection' 
Split    
Description:  Split the selected cell (or cells) 
Syntax: 'obj' Œwi 'Split'rows cols 
rows: number of rows 
cols: number of columns 
Note: if rows & cols are not defined, they default to: 1 & 2 
Example: 
      'obj' Œwi 'Split'2 3 
Start    
Description:  Move cursor to start of Line or of Document 
Syntax:   'obj' Œwi 'Start'unit select 
unit:     'Line' or 'Document' 
       or   5    or     6                  © help file says: 1 2 3 4 6 8 9 10 12 15 instead of 5 6 
select:   (optional, default=0) 0=do not select text, 1=select text 
Example: 
      'ww' Œwi 'Start' 'Document'1           © move to beginning of document 
All possible units are: 
   •Œwi 'Units'                             © help file says: 1 2 3 4 6 8 9 10 12 15 instead of 5 6 
Style    
Description:  Get or Set the Style to be used for a paragraph 
Syntax: 'obj' Œwi 'Style'style 
style:  existing style to be used 
Symbol    
Description:  Inserts a Symbol at the insertion point 
Syntax:  'obj' Œwi 'Symbol'num font 
num: a symbol number or name 
font: (optional) font to be used 
Use: 
      Œwi 'Symbols' 
to get a list of existing symbols 
Symbols    
Description:  List of available symbols or returns 
Syntax:  symbols„'obj' Œwi 'Symbols' 
***** NEEDS TRANSLATION INTO ENGLISH 
Table    
Description:  Inserts a new table with the specified number of lines and columns at the insertion point 
Syntax: 'obj' Œwi 'Table'rows cols 
rows: number of lines 
cols: number of columns 
Note: At the same inserpoint point, selecting a line selects the whole table 
Example: 
      'ww' Œwi 'Table'10 6 
TableOfContents    
Description:  Inserts Table of Contents at the insertion point, at beginning or end. 
Syntax:  'obj' Œwi 'TableOfContents'descriptions 
Example: 
      'ww' Œwi 'TableOfContents' 'Start' ('Title'18'Table of Contents') 
Tabs    
Description:  Deletes or Installs a customized tabulation 
Syntax: 'obj' Œwi 'Tabs' ('keyword1'param1) ('keyword2'param2)... 
    Keywords      Parameters 
    ¯¯¯¯¯¯¯¯      ¯¯¯¯¯¯¯¯¯¯ 
    Erase        (no parameters) 
    Size          in centimeters 
    Alignment     Left, Center, Right, Decimal, Barre or List 
    FollowPoints  Spaces, Points, Dashes or Lines 
Example: 
      'ww' Œwi 'Tabs' 'Erase' ('Size'3) ('Alignment' 'Right') ('FollowPoints' 'Points') 
Notes: 
1. Parameters order is not important, but do Erase first 
2. The next paragraph gets the same tabulations, therefore you need: 
       'obj' Œwi 'Paragraph' ª 'obj' Œwi 'Tabs' 'Erase' 
   or: 'obj' Œwi 'Paragraph' ª 'obj' Œwi 'Style' 'Normal' 
Text    
Description:  Get or Set the Texture within a frame 
Syntax: 'obj' Œwi 'Texture'x 
x: % to apply 
Example: 
      'ww' Œwi 'Texture'20 
Texture    
Description:  Get or Set the Texture within a frame 
Syntax: 'obj' Œwi 'Texture'x 
x: % to apply 
Example: 
      'ww' Œwi 'Texture'20 
TopLeftCell    
Description:  Selects the top left cell in the current table 
Syntax:  'obj' Œwi 'TopLeftCell' 
Example: 
      'ww' Œwi 'TopLeftCell' 
Undo    
Description:  Undo the last change made to the Word document 
Syntax:  'obj' Œwi 'Undo' 
Example: 
      'ww' Œwi 'Undo' 
***** TO BE TESTED 
Unit    
Description:  Converts a unit name to a unit number 
Syntax:  number„'obj' Œwi 'unit'name 
name: one of the following names: 
      1=Character 2:Word 3:Sentence 4:Paragraph 5:Line 6:Story 7:Screen 8:Section 9:Column 10:Row 11:Window 
      12:Cell 13:CharacterFormatting 14:ParagraphFormatting 15:Table 16:Item 
Example: 
      'ww' Œwi 'unit' 'Sentence' 
3 
Units    
Description:  Returns all possible movement units 
Syntax:  'obj' Œwi 'Units' 
Example: 
      'ww' Œwi 'Units' 
Unselect    
Description:  Kind of dirty way of unselecting data: simply move to the line above and back to the current line 
Syntax: 'obj' Œwi 'Unselect' 
Example: 
      'ww' Œwi 'Unselect' 
Up    
Description:  Moves cursor Up selecting (or not selecting) text 
Syntax:   'obj' Œwi 'Up'unit {number} {select} 
unit:     'Paragraph' 'Line' 'Screen' or 'Window' 
       or      4,       5,       7    or    11 
number:   (optional, default=1) number of units to pass 
select:   (optional, default=0) 0=do not select text, 1=select text 
Example: 
      'obj' Œwi 'Up' 'Paragraph'2 0          © move 2 paragraphs Up without selecting them 
Possible units are: 
      •(Œwi 'Units')[4 5 7 11;] 
View    
Description:  Returns the number of an active window view based on its name 
Syntax:  viewnumber„'obj' Œwi 'View'viewname 
viewname & viewnumber are as follows:" 
         0=Document 
         1=OddHeader 
         2=Header1 
         3=EvenHeader 
         4=OddFooter 
         5=Footer1 
         6=EvenFooter 
         7=BottomNote 
         8=EndNote 
         9=Header 
        10=Footer 
Example: 
      'ww' Œwi 'View' 'Header' 
9 
Word97Constants    
Description:  Liste all Word Constants 
Syntax: 'obj' Œwi 'WordConstants' 
Example: 
      'ww' Œwi 'WordConstants' 
Note: 
1. Requires file 'Word Constants.doc' to be in C:\My Documents 
2. Word97Constants kept for upward compatibility purposes with TWord 
***** TO BE REWRITTEN 
Write    
Description:  Add specified text at insertion point and ends with a paragraph mark 
Syntax:  'obj' Œwi 'TypeTextPar'text 
or:      'obj' Œwi 'Write'text 
text: any text 
Example: 
      'ww' Œwi 'TypeTextPar' (200½'This is a new paragraph!  ') 
      'ww' Œwi 'TypeTextPar' ((10 10½¼100),¨Œtcht) 
Notes: 
1. 'Write' kept for upward compatibility with TWord 
2. text may include tab characters (Œtcht's) 
Description   Inheritance   Example   Properties   Methods
 
 This entire Web site has been dynamically generated by APL+Win Objects™ 6.0
 For all questions contact:  info@lescasse.com
 Copyright © 2003-2005 Lescasse Consulting. All rights reserved.