thisform.sendtoword(thisform.edit1,"c:\1.doc")FORM FUNCTION SENDTOWORD
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)")Make another Commadn Button and call the Word text in it.
If Type("Thisform.oword.documents")="O" and; Thisform.oword.documents.count>0 and ; Not Empty(Thisform.cdocfilename) *And Not type(Thisform.cobjectforword)="O" With Thisform.oword With .documents.Item(1) .content.select() .content.Copy() .Save() Endwith .documents.Close .Visible=.F. Endwith Local oEditbox oEditbox=Evaluate(Thisform.cobjectforword) oEditbox.value=_cliptext oEditbox.SetFocus() Store "" To Thisform.cdocfilename, Thisform.cobjectforword EndifYou need few form properties like
Thisform.oword Thisform.cdocfilename Thisform.cobjectforwordOnce you have data from word you can go for crystal report.
>APPEND GENERAL tgeneral FROM W:\ICOSNPD\acord.doc LINK CLASS "Word.Document.6">