TinaP
Well-known Member
- Joined
- Jan 26, 2005
- Messages
- 528
I’m getting the error message Run-time error '-2147024770 (8007007e)' on the highlighted line of my code. This only happens on one computer. Other computers running the same macro work fine.
From what I can figure out, I need to re-register a dll or some other file, but I don't have any idea where to start. How do I find out what file needs to be re-registered on that computer?
Code:
[FONT=Courier New]Sub Send_Request(RowNumber As Long)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>[/FONT]
[FONT=Courier New]<o:p></o:p>[/FONT]
[FONT=Courier New]Dim OutApp As Object<o:p></o:p>[/FONT]
[FONT=Courier New]Dim OutMail As Object<o:p></o:p>[/FONT]
[FONT=Courier New]Dim Message As String<o:p></o:p>[/FONT]
[FONT=Courier New]Dim SecurityDept As String<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p></o:p>[/FONT]
[FONT=Courier New]Application.DisplayAlerts = False<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p></o:p>[/FONT]
[FONT=Courier New][COLOR=red]Set OutApp = CreateObject("Outlook.Application")[/COLOR][/FONT]
[FONT=Courier New]OutApp.Session.Logon<o:p></o:p>[/FONT]
[FONT=Courier New]Set OutMail = OutApp.CreateItem(0)<o:p></o:p>[/FONT]
[FONT=Courier New]Message = Compose_Message(RowNumber)<o:p></o:p>[/FONT]
[FONT=Courier New]With OutMail<o:p></o:p>[/FONT]
[FONT=Courier New] .To = Cells(RowNumber, 25) & "@here.com"<o:p></o:p>[/FONT]
[FONT=Courier New] If Cells(RowNumber, 28) >= 2 Then<o:p></o:p>[/FONT]
[FONT=Courier New] .cc = SecurityDept<o:p></o:p>[/FONT]
[FONT=Courier New] Else: .cc = ""<o:p></o:p>[/FONT]
[FONT=Courier New] End If<o:p></o:p>[/FONT]
[FONT=Courier New] .Subject = _<o:p></o:p>[/FONT]
[FONT=Courier New] "Account ending in " & Right(Cells(RowNumber, 1), 4) & _<o:p></o:p>[/FONT]
[FONT=Courier New] " opened/revised on " & Cells(RowNumber, 2)<o:p></o:p>[/FONT]
[FONT=Courier New] .Body = Message<o:p></o:p>[/FONT]
[FONT=Courier New] .Display<o:p></o:p>[/FONT]
[FONT=Courier New]' .Send<o:p></o:p>[/FONT]
[FONT=Courier New]End With<o:p></o:p>[/FONT]
[FONT=Courier New]On Error GoTo 0<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p></o:p>[/FONT]
[FONT=Courier New]Set OutMail = Nothing<o:p></o:p>[/FONT]
[FONT=Courier New]Set OutApp = Nothing<o:p></o:p>[/FONT]
[FONT=Courier New]Application.DisplayAlerts = True<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p></o:p>[/FONT]
[FONT=Courier New]End Sub<o:p></o:p>[/FONT]
From what I can figure out, I need to re-register a dll or some other file, but I don't have any idea where to start. How do I find out what file needs to be re-registered on that computer?
Last edited: