Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default is there anyone that has successfully sent a page or a copied range using outlook express?

i have looked at code on the sites listed, no luck. always returns an error,
method "sendmail" of object '_workbook failed. tried code to send a text
message, that worked, but can't figure out how to get a copied range into
the body. i tried sendkeys, to tab 4 times, cursor actually got to the body
once, but usually it stays in the to header. sometimes, i have managed to
paste the selection into the to header, instead of the body.




--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default is there anyone that has successfully sent a page or a copied range using outlook express?

Give this a go.

http://www.paulsadowski.com/WSH/cdo.htm

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
|i have looked at code on the sites listed, no luck. always returns an
error,
| method "sendmail" of object '_workbook failed. tried code to send a text
| message, that worked, but can't figure out how to get a copied range into
| the body. i tried sendkeys, to tab 4 times, cursor actually got to the
body
| once, but usually it stays in the to header. sometimes, i have managed to
| paste the selection into the to header, instead of the body.
|
|
|
|
| --
|
|
| Gary
|
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default is there anyone that has successfully sent a page or a copied range using outlook express?

thanks dave, but isn't there any way to just past the range i've copied to
the clipboard in the body of an outlook express email?

--


Gary


"Dave Patrick" wrote in message
...
Give this a go.

http://www.paulsadowski.com/WSH/cdo.htm

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
|i have looked at code on the sites listed, no luck. always returns an
error,
| method "sendmail" of object '_workbook failed. tried code to send a text
| message, that worked, but can't figure out how to get a copied range
into
| the body. i tried sendkeys, to tab 4 times, cursor actually got to the
body
| once, but usually it stays in the to header. sometimes, i have managed
to
| paste the selection into the to header, instead of the body.
|
|
|
|
| --
|
|
| Gary
|
|
|




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default is there anyone that has successfully sent a page or a copied range using outlook express?

Afraid there's no object model within OE and IMO SendKeys is too flakey
(some process may unexpectedly steal the focus in the middle). You should
be able to instantiate the CDO.Message object in your code to send the mail
message using one of Paul's examples.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
| thanks dave, but isn't there any way to just past the range i've copied to
| the clipboard in the body of an outlook express email?
|
| --
|
|
| Gary


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default is there anyone that has successfully sent a page or a copied range using outlook express?

ok, thanks dave, i figured i had adapted this code i found to open and
address a new email and just needed a way to paste the clipboard info

Sub Mail()
'Example for Outlook Express
Dim msg As String
Dim cell As Range
Dim Recipient As String
Dim Subj As String
Dim HLink As String
Recipient = "my email"

Subj = "email"
Sheets("payroll report").Range("b4:q34").Copy

HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj

ActiveWorkbook.FollowHyperlink (HLink)

Application.Wait (Now + TimeValue("0:00:03"))
Application.SendKeys "%s"

End Sub

--


Gary


"Dave Patrick" wrote in message
...
Afraid there's no object model within OE and IMO SendKeys is too flakey
(some process may unexpectedly steal the focus in the middle). You should
be able to instantiate the CDO.Message object in your code to send the
mail
message using one of Paul's examples.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
| thanks dave, but isn't there any way to just past the range i've copied
to
| the clipboard in the body of an outlook express email?
|
| --
|
|
| Gary






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default is there anyone that has successfully sent a page or a copied range using outlook express?

i think i'll just tell the client to click file/send to. it's a lot easier

--


Gary


"Dave Patrick" wrote in message
...
Afraid there's no object model within OE and IMO SendKeys is too flakey
(some process may unexpectedly steal the focus in the middle). You should
be able to instantiate the CDO.Message object in your code to send the
mail
message using one of Paul's examples.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
| thanks dave, but isn't there any way to just past the range i've copied
to
| the clipboard in the body of an outlook express email?
|
| --
|
|
| Gary




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default is there anyone that has successfully sent a page or a copied range using outlook express?

one other question:

how come code posted on a lot of these websites never runs as posted? there
are always variables or something missing. half the time, that's the hardest
part for me to set up.

--


Gary


"Dave Patrick" wrote in message
...
Afraid there's no object model within OE and IMO SendKeys is too flakey
(some process may unexpectedly steal the focus in the middle). You should
be able to instantiate the CDO.Message object in your code to send the
mail
message using one of Paul's examples.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
| thanks dave, but isn't there any way to just past the range i've copied
to
| the clipboard in the body of an outlook express email?
|
| --
|
|
| Gary




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 221
Default is there anyone that has successfully sent a page or a copied range using outlook express?

Try another site, Gary:
www.vbaexpress.com
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Gary Keramidas" wrote in message
...
one other question:

how come code posted on a lot of these websites never runs as posted?

there
are always variables or something missing. half the time, that's the

hardest
part for me to set up.

--


Gary


"Dave Patrick" wrote in message
...
Afraid there's no object model within OE and IMO SendKeys is too flakey
(some process may unexpectedly steal the focus in the middle). You

should
be able to instantiate the CDO.Message object in your code to send the
mail
message using one of Paul's examples.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
| thanks dave, but isn't there any way to just past the range i've

copied
to
| the clipboard in the body of an outlook express email?
|
| --
|
|
| Gary






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default is there anyone that has successfully sent a page or a copied range using outlook express?

Give this a try;

Public Sub SendMail()
Dim objMessage
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.Sender = "
objMessage.To = "
objMessage.TextBody = GetData

'==This section provides the configuration information for the remote
SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.keramidas.com"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==

objMessage.Send
Set objMessage = Nothing
End Sub

Function GetData()
Dim strTemp As String
'This is the column of our first cell.
x = 2
Do While Sheets("sheet1").Cells(4, x).Value < ""
strTemp = strTemp & Trim(Sheets("sheet1").Cells(4, x).Value) &
Space(1)
x = x + 1
Loop
GetData = strTemp
End Function

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Gary Keramidas" wrote:
| one other question:
|
| how come code posted on a lot of these websites never runs as posted?
there
| are always variables or something missing. half the time, that's the
hardest
| part for me to set up.
|
| --
|
|
| Gary


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default is there anyone that has successfully sent a page or a copied range using outlook express?

For OE see
http://www.rondebruin.nl/mail/oebody.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Gary Keramidas" wrote in message ...
i have looked at code on the sites listed, no luck. always returns an error, method "sendmail" of object '_workbook failed. tried
code to send a text message, that worked, but can't figure out how to get a copied range into the body. i tried sendkeys, to tab 4
times, cursor actually got to the body once, but usually it stays in the to header. sometimes, i have managed to paste the
selection into the to header, instead of the body.




--


Gary







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Express nanab Excel Discussion (Misc queries) 4 July 14th 07 10:13 PM
Outlook Express Miki Jo Excel Discussion (Misc queries) 3 December 1st 05 09:38 PM
Send to Outlook 2000 not Outlook Express Jimbo Excel Discussion (Misc queries) 2 January 4th 05 08:19 PM
Send a range in Excel as the body of an Outlook Express message Katie[_3_] Excel Programming 2 August 14th 04 12:50 PM
Display mail application either in Outlook, or Outlook express [email protected] Excel Programming 0 April 13th 04 09:50 PM


All times are GMT +1. The time now is 12:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"