Excel can't find OE

G

GL

Hi, I test my code at home; the email sent out find. I copied the code at
work, when click the command button, it said no mail system installed. Both
system have W2K, Office2K and OE. I know OE worked fine, because I can send
email from Acess 2K. On another computer at work, I used the same worksheet,
the mail sending was successfully.
What did I miss?
Thank you.
GL
 
G

G Lam

Brian,
Here is the code. I copy this from the internet.
It worked fine in my home pc and two pcs at work, but one W2K pc at work
said no email system. While this pc can send email (OE) from Access 2K.
Any idea.
I checked Ron's link, but no luck.
Would there be setup or installation issues in W2K or Excel 2K?
GL

***********************************************
Private Sub CommandButton1_Click()
If Application.MailSystem <> xlNoMailSystem Then

Add_range
With ActiveWorkbook

'For several recipients.
.SendMail Recipients:="(e-mail address removed)", Subject:="Daily"
.Close SaveChanges:=False
End With
Application.MailLogoff
Else
MsgBox "No MS-postsystem are installed.", vbInformation, _
"E-mail message"
End If
End Sub
**********************************************
Sub Add_range()
Dim wbOriginal As Workbook
Dim wsOriginal As Worksheet
Dim wsTarget As Worksheet
Dim rnSource As Range

Set wbOriginal = ThisWorkbook
Set wsOriginal = wbOriginal.Worksheets(3)

With wsOriginal
Set rnSource = .Range("A1:D10")
End With

Application.ScreenUpdating = False

Workbooks.Add (xlWBATWorksheet)

Set wsTarget = ActiveSheet

rnSource.Copy

wsTarget.Range("A1").PasteSpecial Paste:=8
wsTarget.Range("A1").PasteSpecial (xlPasteValue)

With Application
..CutCopyMode = False
..ScreenUpdating = True
End With

End Sub

**********************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top