This.oword= Createobject("Word.Application")Then, in the button (same parent as your editbox)
Lparameters oMemo, cFilename ** parameters are the editbox object and a filename to keep a copy ** filename is not really necessary. lcObject=Sys(1272, oMemo) lcObject=Strtran(lcObject, Getwordnum(lcObject, 1, "."), "thisform") This.cobjectforword=lcObject _Cliptext="" _Cliptext=oMemo.Value This.cdocfilename=Fullpath(cFilename) With This.oword .documents.Add.Content.Paste ** this is just the special needs of my app - set language to English (US) .documents.Item(1).Content.Select .Selection.LanguageID = 1033 .Selection.NoProofing = .F. .Application.CheckLanguage = .F. ** end special .documents.Item(1).SaveAs(This.cdocfilename) .Visible=.T. Endwith Messagebox("Now Alt-tab to bring up Word. Return here and click OK when finished with Word (don't close it)")Now in form.activate, you need to catch it when returning from Word:
If Type("this.oword.documents")="O" and; this.oword.documents.count>0 and ; Not Empty(This.cdocfilename) And Not type(This.cobjectforword)="O" With This.oword With .documents.Item(1) .content.select() .content.Copy() .Save() Endwith .documents.Close .Visible=.F. Endwith Local oEditbox oEditbox=Evaluate(This.cobjectforword) oEditbox.value=_cliptext oEditbox.SetFocus() Store "" To This.cdocfilename, This.cobjectforword EndifWorks for me.