Al
[WD12] MS Word automation August 13, 2008 10:25AM |
Bosher
Re: [WD12] MS Word automation August 13, 2008 07:53PM |
Al
Re: [WD12] MS Word automation August 14, 2008 04:11PM |
Bosher
Re: [WD12] MS Word automation August 14, 2008 04:25PM |
Piet van Zanten
Re: [WD12] MS Word automation August 14, 2008 05:49PM |
WHEN EXCEPTION Error("An error has occuurred ","",... "Erro number: "+ExceptionInfo(errCode),... "Message:"+ExceptionInfo(errSummary),... "Info:"+ExceptionInfo(errInfo),... "During:"+ExceptionInfo(errDuring),... "Procedure:"+ExceptionInfo(errProcess),... "Object:"+ExceptionInfo(errElement),... "Line:"+ExceptionInfo(errLine)) MyWord>>Documents>>Close(OLEFalse) MyWord>>Quit() delete MyWord RESULT False END bVisible is boolean =False //-------BEGIN Loading and initializing Word MyWord=GetActiveObject("Word.Application") IF MyWord=Null THEN // there was no Word already opened , we allocate one MyWord = new object OLE "Word.Application"//"Word.Basic" ELSE IF YesNo("All active documents in Word must be closed first.","Do you want to close them?") THEN MyWord>>ActiveDocument>>Close(OLEFalse) ELSE RESULT False END END MyWord>>Visible=bVisible MyWord>>Application>>Visible=bVisible MyWord>>Documents>>Open(DocumentName,OLEFalse,OLEFalse) MyWord>>Selection>>WholeStory() MyWord>>Selection>>Find>>Execute(sSearchString,OLEFalse,OLETrue,OLEFalse,OLEFalse,OLEFalse,OLETrue,1,OLEFalse,sSubstString,2) MyWord>>Visible = OLETrue MyWord>>Quit() delete MyWord
Al
Re: [WD12] MS Word automation August 15, 2008 02:21PM |
Piet van Zanten
Re: [WD12] MS Word automation August 15, 2008 03:54PM |
Al
Re: [WD12] MS Word automation August 15, 2008 05:51PM |