Vous êtes sur la page 1sur 1

REM ************************************** REM * Macro to run Gword for Windows * REM * Version 1.

0 30/12/93 * REM * This version is for Word 6.0 for windows * REM * (C) Singular S.A. All Rights Reserved * REM ************************************** Declare Function MessageBeep Lib "USER"(I As Integer) As Integer Declare Function GetPrivateProfilestring Lib "Kernel"(section$, entry$, dfault$, returned$, siz As Integer, fname$) As Integer Declare Function WinExec LIB "KERNEL" (cmd$, cmdShow AS INTEGER) AS INTEGER Sub MAIN dirty = IsDocumentDirty() REM step 1: copy the word under the caret to the clipboard EditBookmark.Name = "QAZ", .Add WordLeft 1 WordRight 1, 1 Editcopy() EditBookmark.Name = "QAZ", .Goto EditBookmark .Name = "QAZ", .Delete REM step 2: find out where gword is hiding and launch it returned$ = "" rslt=GetPrivateprofileString("GWORD","ProgPath","@@@",returned$,128,"GWORDW.INI") if returned$ = "@@@" then MsgBox "Unable to find Gword","Gword for windows", 48 goto fatalexit endif fname$ = returned$ + "\GWORDW.EXE" rslt = WinExec(fname$,1) if rslt < 32 then MsgBox "Unable to run Gword","Gword for windows",48 endif fatalexit: SetDocumentDirty(dirty) End Sub

Vous aimerez peut-être aussi