Automation Error Running Word From Vb6
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Sat, 01 Oct 2016 10:32:02 GMT by s_hv972 (squid/3.5.20)
this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing
Runtime Error 440 Automation Error Vb6
messages, select the forum that you want to visit from the selection below. Results automation error library not registered vb6 1 to 4 of 4 Thread: VB6 Word Automation Error Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear automation error element not found vb6 Mode Switch to Hybrid Mode Switch to Threaded Mode Apr 13th, 2011,10:04 AM #1 NetLost View Profile View Forum Posts Thread Starter Member Join Date Mar 2009 Posts 51 VB6 Word Automation Error Hi All, Hope http://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_winother/getting-visual-basic-automation-error-unexplainded/82b6db5a-a405-4c8e-8376-795a1e7e92e8 someone can assist. This is a program written in VB6 SP6 and references Word 2007. What the program does is opens an HTML file in word and saves as an RTF. The program runs fine under the scheduler on my development workstation but periodically fails when running under the production server scheduler. The error message I am getting 429 ActiveX component can't create object. This error is inconsistent but once it starts happening http://www.vbforums.com/showthread.php?647143-VB6-Word-Automation-Error it continues until I go on the server and halt the program and clean up the word instances in task manager that it has left behind. Then it will run okay for a bit and then fail. My development workstation is using Office Word 2007 SP1 and the server, Office Word 2007 Enterprise no service pack. I have tried reinstalling the program on the server and it didn't seem to help. The account running the app has admin rights Code below. In red is where the problem seems to sporadically occur. Thanks in advance for help Code: Public Sub ConvertMessageToRTF(MessageFilePath As String, FileNameToConvert As String, FileNameToConvertExt As String, LogFile As String) Dim oWord As New Word.Application Dim oDoc As Word.Document Dim strWriteMsg As String On Error GoTo Err_ConvertMessageToRTF Call WriteToLogFile(LogFile, "About to set oWord = New Word.Application", True) Set oWord = New Word.Application Call WriteToLogFile(LogFile, "About to open " & MessageFilePath & FileNameToConvert & "." & FileNameToConvertExt, True) Set oDoc = oWord.Documents.Open(MessageFilePath & FileNameToConvert & "." & FileNameToConvertExt) Call WriteToLogFile(LogFile, "About to save as " & MessageFilePath & FileNameToConvert & " to RTF ", True) oDoc.SaveAs MessageFilePath & FileNameToConvert, wdFormatRTF strWriteMsg = "Successfully created file " & MessageFilePath & FileNameToConvert & " to RTF" Exit_ConvertMessageToRTF: oWord.Quit Set oWord = Nothing Set oDoc = Nothing Call WriteTo
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/6415847/opening-word-2007-from-vb-6 the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping automation error each other. Join them; it only takes a minute: Sign up Opening word 2007 from vb 6 up vote 0 down vote favorite I have an legacy project that I am trying to debug on windows server 2003. 1) I cannot get the application to open word 2007 (installed on that machine) 2) I know that the application vb6 automation error does open on other computers as it is written - those machines are running xp or windows terminal server, 3) The application is opened with the standard declaration Private wdApplication As Word.Application and code Set wdApplication = GetObject(, "Word.Application") If wdApplication Is Nothing Then Set wdApplication = CreateObject("Word.Application") If wdApplication Is Nothing Then Kill sFileName End If ' other code end if any ideas as to what the windows server doesnt have set that I need to set thank you I tried the methods suggested and it was not successful I went looking through my code library I inherited and I found an application that does run word correctly, it was setup by a different person (apparently) it uses a class to connect to word that has these functions Option Explicit Private bIsNewApp As Boolean Private sErrorStr As String Private oWordApp As Object Private ys As YouthSoft Public Sub MakeVisible() oWordApp.Visible = True oWordApp.ActiveDocument.Select oWordApp.Selection.GoTo 1, 1 End Sub Public Sub StartWord() 'Set oWordApp = GetObject(, "Word.Application") If oWordApp Is Noth
be down. Please try the request again. Your cache administrator is webmaster. Generated Sat, 01 Oct 2016 10:32:02 GMT by s_hv972 (squid/3.5.20)