Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi everyone, I've got a small problem.
I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Julaf
See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Ron, I was in your website before, very instructive.
The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds ..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Download the example workbook for my page
There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
ok, but on your example, it works only if the customer have outlook.
Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That's not true
Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ok, it finally works for me, thanks a lot for all this information !
I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Julaf
There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I saw this form just after send you the answer.
I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ok, sorry ron , I add the function,
but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Test the code in the example workbook first
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I tried it just with changing smtp and mail, I've got this error on the line
rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#13
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Even if I try with the original code, I have this error.
Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#14
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Are you sure you have a few cell selected and use the code in the workbook
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#15
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes, everything is on the same workbook and I selected few cells.
I still have a runtime error :S "Ron de Bruin" wrote: Are you sure you have a few cell selected and use the code in the workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#16
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ok it works with
rng = ActiveSheet.UsedRange Thank you so so much ! "Julaf" wrote: Yes, everything is on the same workbook and I selected few cells. I still have a runtime error :S "Ron de Bruin" wrote: Are you sure you have a few cell selected and use the code in the workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#17
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Send me the workbook private that you use now
Which Excel version do you use ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Yes, everything is on the same workbook and I selected few cells. I still have a runtime error :S "Ron de Bruin" wrote: Are you sure you have a few cell selected and use the code in the workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#18
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello, I've got one more question,
When there is a picture, or a checkbox, in the original excel page ; when you receive it by email, everything is gone, could you explain me why ? And is it possible to add this in the body or definitively not ? "Ron de Bruin" wrote: Send me the workbook private that you use now Which Excel version do you use ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Yes, everything is on the same workbook and I selected few cells. I still have a runtime error :S "Ron de Bruin" wrote: Are you sure you have a few cell selected and use the code in the workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#19
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The function delete the pictures to avoid problems and ghost files
I have CDO code that can do it but it is not working the way I want If you use Outlook see http://www.rondebruin.nl/mail/folder3/mailenvelope.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hello, I've got one more question, When there is a picture, or a checkbox, in the original excel page ; when you receive it by email, everything is gone, could you explain me why ? And is it possible to add this in the body or definitively not ? "Ron de Bruin" wrote: Send me the workbook private that you use now Which Excel version do you use ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Yes, everything is on the same workbook and I selected few cells. I still have a runtime error :S "Ron de Bruin" wrote: Are you sure you have a few cell selected and use the code in the workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#20
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I don't use outlook.
Actually, I used this function to send an excel request from all the computer connected, but some of them don't have any mail software. So CDO, was perfect for that. Any idea on how to get round this rule ? Thanks "Ron de Bruin" wrote: The function delete the pictures to avoid problems and ghost files I have CDO code that can do it but it is not working the way I want If you use Outlook see http://www.rondebruin.nl/mail/folder3/mailenvelope.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hello, I've got one more question, When there is a picture, or a checkbox, in the original excel page ; when you receive it by email, everything is gone, could you explain me why ? And is it possible to add this in the body or definitively not ? "Ron de Bruin" wrote: Send me the workbook private that you use now Which Excel version do you use ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Yes, everything is on the same workbook and I selected few cells. I still have a runtime error :S "Ron de Bruin" wrote: Are you sure you have a few cell selected and use the code in the workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
#21
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Any idea on how to get round this rule ?
When I think it is ready I will publish it on the CDO page -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... I don't use outlook. Actually, I used this function to send an excel request from all the computer connected, but some of them don't have any mail software. So CDO, was perfect for that. Any idea on how to get round this rule ? Thanks "Ron de Bruin" wrote: The function delete the pictures to avoid problems and ghost files I have CDO code that can do it but it is not working the way I want If you use Outlook see http://www.rondebruin.nl/mail/folder3/mailenvelope.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hello, I've got one more question, When there is a picture, or a checkbox, in the original excel page ; when you receive it by email, everything is gone, could you explain me why ? And is it possible to add this in the body or definitively not ? "Ron de Bruin" wrote: Send me the workbook private that you use now Which Excel version do you use ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Yes, everything is on the same workbook and I selected few cells. I still have a runtime error :S "Ron de Bruin" wrote: Are you sure you have a few cell selected and use the code in the workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Even if I try with the original code, I have this error. Do you konw why ? "Julaf" wrote: I tried it just with changing smtp and mail, I've got this error on the line rng.Copy I've got 'Application.defined' message error Thanks for all Ron "Ron de Bruin" wrote: Test the code in the example workbook first -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, sorry ron , I add the function, but I've got an error 404. Is that link with the version of Excel ?? "Julaf" wrote: I saw this form just after send you the answer. I've got a msg error back on this line : .HTMLBody = RangetoHTML(rng) Sub or function not defined "Ron de Bruin" wrote: Hi Julaf There is a example in the workbook to send a sheet in the body -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Ok, it finally works for me, thanks a lot for all this information ! I really appreciate your help Ron. I have one more question, do you think it's possible to send the file as a mail-body (always with using CDO form) and not as an attachment. "Ron de Bruin" wrote: That's not true Download the workbook from the CDO page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... ok, but on your example, it works only if the customer have outlook. Is it possible in your code to do the same things from a computer without any mail software (I think about people who use an hotmail adress) Thanks for your help. "Ron de Bruin" wrote: Download the example workbook for my page There is a example for one worksheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Thanks Ron, I was in your website before, very instructive. The thing is that I want to usend an active sheet from a computer without any software. And I use this following CDO code : Sub CDO_Mail_Small_Text() Dim iMsg As Object Dim iConf As Object Dim strbody As String Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ = "smtp" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With strbody = "Line 1" & vbNewLine & vbNewLine & _ "Line 2" With iMsg Set .Configuration = iConf .To = " .From = """Julaf"" " .Subject = "Hope it works !" .TextBody = strbody .AddAttachment ThisWorkbook.ActiveSheet .Send End With End Sub But for the line with attachment, I've got on mismatch... "Ron de Bruin" wrote: Hi Julaf See the examples here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Julaf" wrote in message ... Hi everyone, I've got a small problem. I'd like to send my active sheet with a CDO code. I use .AddAttachment ThisWorkbook.ActiveSheet but it looks like a problem Run time erro '13' Type-mismatch don't really know why because it's the correct name of this sheet. Hope to have news about that. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel e-mail attachment | Excel Discussion (Misc queries) | |||
e-mail one worksheet as an attachment | Excel Discussion (Misc queries) | |||
mail and attachment | Excel Discussion (Misc queries) | |||
E-Mail attachment to same e-mail address in Outlook | Excel Discussion (Misc queries) | |||
how to e-mail with an attachment using hotmail | Excel Worksheet Functions |