Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sendmail works in excel 2002 but not 2000
Hi there,
Here is my problem: I have a workbook to email. If there is no email address in G8 then call one macro which sends two emails. If there is an address call the other macro which sends three macros. Sub send_po() If Range("G8").Value = "none supplied" Then Call return_to_orderer Else Call send_to_supplier End If End Sub This macro works on both Excel 2000 and 2002 Sub return_to_orderer() Dim orderer As String Dim wb As Workbook orderer = Range("c4").Value Set wb = ActiveWorkbook With wb .SendMail ", "P.O. Number: " & ActiveSheet.Range("C6") .SendMail ActiveSheet.Range("g4"), "Please send this to supplier as no email address is listed" .ChangeFileAccess xlReadOnly 'Kill .FullName End With End Sub This part works on Excel 2002 but causes an error on Excel 2000. The error message is "Run-time error 2147417848 (80010108) Automation error The object invoked has disconnected from its client" Sub send_to_supplier() Dim orderer As String orderer = Range("c4").Value Dim wb As Workbook Set wb = ActiveWorkbook With wb .SendMail ", "P.O. Number: " & ActiveSheet.Range("C6") .SendMail ActiveSheet.Range("g4"), "P.O. " & ActiveSheet.Range("C6") & " has been approved and sent to " & ActiveSheet.Range("C8") .SendMail ActiveSheet.Range("G8"), "Purchase Order Confirmation " .ChangeFileAccess xlReadOnly 'Kill .FullName End With End Sub Any clues as to why this works on my machine (Excel 2002) but not my bosses (Excel 2000). I have tried declaring the ranges "G4" and "G8" (as strings, variants and arrays) and then using those declarations in the .SendMail line subsequent to this coding but nothing seems to have worked. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sendmail works in excel 2002 but not 2000
Look at your win.ini file
See number 2 on this page http://www.rondebruin.nl/mail/problems.htm -- Regards Ron de Bruin http://www.rondebruin.nl "RogueSwan" wrote in message om... Hi there, Here is my problem: I have a workbook to email. If there is no email address in G8 then call one macro which sends two emails. If there is an address call the other macro which sends three macros. Sub send_po() If Range("G8").Value = "none supplied" Then Call return_to_orderer Else Call send_to_supplier End If End Sub This macro works on both Excel 2000 and 2002 Sub return_to_orderer() Dim orderer As String Dim wb As Workbook orderer = Range("c4").Value Set wb = ActiveWorkbook With wb .SendMail ", "P.O. Number: " & ActiveSheet.Range("C6") .SendMail ActiveSheet.Range("g4"), "Please send this to supplier as no email address is listed" .ChangeFileAccess xlReadOnly 'Kill .FullName End With End Sub This part works on Excel 2002 but causes an error on Excel 2000. The error message is "Run-time error 2147417848 (80010108) Automation error The object invoked has disconnected from its client" Sub send_to_supplier() Dim orderer As String orderer = Range("c4").Value Dim wb As Workbook Set wb = ActiveWorkbook With wb .SendMail ", "P.O. Number: " & ActiveSheet.Range("C6") .SendMail ActiveSheet.Range("g4"), "P.O. " & ActiveSheet.Range("C6") & " has been approved and sent to " & ActiveSheet.Range("C8") .SendMail ActiveSheet.Range("G8"), "Purchase Order Confirmation " .ChangeFileAccess xlReadOnly 'Kill .FullName End With End Sub Any clues as to why this works on my machine (Excel 2002) but not my bosses (Excel 2000). I have tried declaring the ranges "G4" and "G8" (as strings, variants and arrays) and then using those declarations in the .SendMail line subsequent to this coding but nothing seems to have worked. Thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
sendmail works in excel 2002 but not 2000
that is a solution for xl2002 which is not the problem (the mapix line
is on both machines). I should have also mentioned that the error occurs here (after sending the explicitly named email, which actually gets sent): .SendMail ActiveSheet.Range("g4"), "P.O. " & ActiveSheet.Range("C6") & " has been approved and sent to " & ActiveSheet.Range("C8") .SendMail ActiveSheet.Range("G8"), "Purchase Order Confirmation " .ChangeFileAccess xlReadOnly 'Kill .FullName End With End Sub *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
sendmail works in excel 2002 but not 2000
Hi Rogue
Do you use Outlook or Outlook express -- Regards Ron de Bruin http://www.rondebruin.nl "Rogue Swan" wrote in message ... that is a solution for xl2002 which is not the problem (the mapix line is on both machines). I should have also mentioned that the error occurs here (after sending the explicitly named email, which actually gets sent): .SendMail ActiveSheet.Range("g4"), "P.O. " & ActiveSheet.Range("C6") & " has been approved and sent to " & ActiveSheet.Range("C8") .SendMail ActiveSheet.Range("G8"), "Purchase Order Confirmation " .ChangeFileAccess xlReadOnly 'Kill .FullName End With End Sub *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting Excel 2002 to MS Works | Excel Discussion (Misc queries) | |||
Excel 2000 VBA App Now Works in Excel 2003, but not Excel 2002 | Excel Programming | |||
Code works with Excel 2000 but not with Excel 2002 | Excel Programming | |||
Code works with Excel 2000 but not with Excel 2002 | Excel Programming | |||
Code works with Excel 2000 but not with Excel 2002 | Excel Programming |