|
Tip>Designer>Word Functions |
|
|
Dynamically move the cursor up |
|
|
Article #: |
0005 |
|
Contributor: |
Joanne Irvine-Smith |
|
GF version: |
3.05 |
|
Applies to: |
Moving the cursor in Microsoft Word |
|
Last updated: |
July 10, 2001 |
Description
Dynamically moves the cursor back up in a document to the position specified.
Explanation
To move the cursor up to a specific point in a document, use the following function in a FillPoint:
WordApp.Selection.MoveUp(Unit,Count,Extend)
Click here for a description of each variant.
|
VARIANT |
DESCRIPTION |
|
Unit |
The unit by which to move the selection. Can be one of the following WdUnits constants: wdLine (5), wdParagraph (4), wdWindow (11) or wdScreen (7). The default value is wdLine. |
|
Count |
The number of units the selection is to be moved. The default value is 1. |
|
Extend |
Can be either wdMove (0) or wdExtend (1). If wdMove is used, the selection is collapsed to the end point and moved up. If wdExtend is used, the selection is extended up. The default value is wdMove. |
For example:
%[WordApp.Selection.MoveUp(5,8,0)]
will move the cursor up 8 lines.
%[WordApp.Selection.MoveUp(4,1,0)]
will move the cursor to the top of the paragraph.
%[WordApp.Selection.MoveUp(11,1,0)]
will move the cursor to the top of the document.
|
NOTE |
%[RunMacro('StartOfDocument')].
|
Template Example
Click here to view an example in a template.
|
%[Transfer=Dialogs.Select('\Demo\Transfer','')] %[FormatDate(Transfer.Date, 'mmmm dd, yyyy')] %[Transfer.Name] %[Transfer.Address]
Dear %[Transfer.Name]
Property Transfer: %[Transfer.Property]
The amount of $%[Transfer.Amount] is owed by you for the above transfer. Please could you contact our offices at your earliest convenience to arrange payment.
Yours sincerely
P Anderson Attorney WILLOWMORE RUSKMAT & SMITH (Our Ref: PA/MB)
%[~x=WordApp.Selection.MoveUp(11,1,0)]
|
Click here to view a document generated from this template.
|
| (the position of the cursor) August 10, 2001 Janet Lee 24 Albert Road Scottsville, New York U.S.A. 14546
Dear Janet Lee
Property Transfer: 32151
The amount of $15,000.00 is owed by you for the above transfer. Please could you contact our offices at your earliest convenience to arrange payment.
Yours sincerely
P Anderson Attorney WILLOWMORE RUSKMAT & SMITH (Our Ref: PA/MB)
|