Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: OLE 1129
; Open EXTRA! ver. 6.3 system object ErrorMode(@OFF) LastError() ExtraSystem = ObjectOpen("EXTRA.System") ;Failure occurs here with error code 1129 Error = LastError() ErrorMode(@ON) If(Error != 0)Then Message("Open Error","Failed to open Extra! system object. Error Code: %Error%") Exit EndIf ; Rest of script omitted for clarityYet I can open and control EXTRA! with VBScript and Delphi3. For instance, the following VBScript works fine (run against Windows Scripting Host):
' VBScript - Test of Extra! OLE Interface dim ExtraSystem, ExtraSession Set ExtraSystem = CreateObject("EXTRA.System") if (ExtraSystem <> "EXTRA! Personal Client") then 'Do we have a valid Extra system object? MsgBox "Error trying to create Extra System object.", vbOKOnly + vbCritical, "Script Error" else Set ExtraSession = ExtraSystem.Sessions.Open("D:\Apps\Extra\Sessions\Session1.EDP") if(ExtraSession <> "Session1")then MsgBox "Failed to create session.", vbOKOnly + vbCritical, "Script Error" else ' ExtraSession.Visible = TRUE ExtraSession.Connected = TRUE MsgBox "Successful", vbOKOnly + vbInformation, "Session Open and Connected" ExtraSession.Connected = FALSE Set ExtraSession = Nothing end if ' Release the system object variable. Set ExtraSystem = Nothing end ifAnyone have any ideas?
And maybe try ObjectOpen with some other app (like Word or Netscape) to see if our OLE is working on your system at all.
Fee fie alpha doe fum
and you want to change "alpha" to "beta". Try this out:
;------------------------------ file = "C:\Incoming\Enroute to Tech Support\oleword.doc" oldtext = "alpha" newtext = "beta" ;------------------------------ App = ObjectOpen("Word.Application") Docs = App.Documents Doc = Docs.Open(file) Content = Doc.Content Find = Content.Find Find.Execute(:: FindText = oldtext, ReplaceWith = newtext, Replace = 2) Doc.Save() Doc.Close() App.Quit() ObjectClose(Find) ObjectClose(Content) ObjectClose(Doc) ObjectClose(Docs) ObjectClose(App) Message("Replace", "Done")
App = ObjectOpen("Word.Application")I am using NT 4.0 with Service Pack 4, a PC with 128MB RAM, and a 200MHz Pentium Pro.
I developed some very simple in-process and out-of-process test servers to test WinBatch with. I got WinBatch to work with a very simple out-of-process server but cannot get it to work with an equally simple in-process server (1129 again). Both test servers work with every other language I have tried (Delphi, MSVC++, and VBScript).
And our developers suggested you try it on a different machine and see what happens.
By the way, your script for Word failed because "Word.Application" is not valid for Word 7 - you have to use "Word.Basic" and then use WordBasic commands. No backward compatibility from Microsoft. So my status is that I can run Word, Excel, and any other out-of-process server but all in-process servers fail with error 1129. I can only test under the IDE since I have the trial version.
We're hoping to get this out early next year (1999)...
Article ID: W13663
Filename: OLE - Word and 1129 Errors with InProcess Server.txt
File Created: 1999:05:13:10:05:14
Last Updated: 1999:05:13:10:05:14