Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Bookmarks
Message
De
10/11/2000 11:16:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/11/2000 10:07:48
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00438630
Message ID:
00440241
Vues:
15
>Hi Barbara,
>
>I ended up using a combination of both your suggestions and Cetin's.
>
>
>  ThisForm.oWord = CreateObject("Word.Application")
>  WITH Thisform.oWord
>    oDoc = .Documents.Open(lcTemplate)
>    .ActiveDocument.SaveAs("Temp.doc")
>    WITH Thisform.oWord.ActiveDocument
>      FOR nField = 1 TO FCOUNT("tmpQuote")
>        IF .Bookmarks.Exists(FIELD(nField))
>        .FormFields(FIELD(nField)).Result = ALLTRIM(TRANSFORM(EVALUATE(FIELD(nField))))
>        ENDIF
>      ENDFOR
>    ENDWITH
>    .Visible = .T.
>    .WindowState = 0
>    WAIT WINDOW "Press any Key to Continue"
>  ENDWITH
>
>
>I added the wait wind to stop processing until the word object is closed.
>
>Sometimes I have several instances of WinWord running in the taskmanager. Is there a way to detect this?
>
>Thanks

You could do something like :
Declare integer GetForegroundWindow in WIN32API
Declare short IsWindow in WIN32API integer

*..
  .visible = .t.	&& Show word app
  .Activate
Endwith
lHwndWord = GetForegroundWindow()  && Save word window handle
do while IsWindow(lHwndWord)
enddo
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform