Kbase P10392: ACTIVEX: Example of MS Word goto() method to possition in a
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/22/2003 |
|
Status: Unverified
GOAL:
Example of goto() method to position in a table.
FIX:
DEFINE VARIABLE oWord AS COM-HANDLE NO-UNDO.
def var WdGoToItem as integer no-undo.
def var WdGoToDirection as integer no-undo.
def var Count as integer no-undo.
DEFINE VARIABLE nombre AS CHAR INITIAL "" NO-UNDO.
ASSIGN WdGoToItem = 2 . /* wdGoToTable =2 */
ASSIGN WdGoToDirection = 1. /* WdGoToAbsolute = 1 */
ASSIGN nombre = "".
ASSIGN Count = 3. /* go to table 3 in the document */
CREATE "Word.Application" oWord.
oWord:Documents:Open("c:\a1.doc"). /* document with Multiple Tables */
oWord:Visible = TRUE.
/* oWord:ActiveDocument:SELECT(). */
oWord:selection:Goto( WdGoToItem BY-VARIANT-POINTER, WdGoToDirection BY-VARIANT-POINTER, Count BY-VARIANT-POINTER, nombre BY-VARIANT-POINTER).
/* Do your stuff */
RELEASE OBJECT oWord. /* release the object */