Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
I'm sending out a new mail message and attaching the current excel worksheet.
I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
You need other code for that
See the Outlook Object model section on this page http://www.rondebruin.nl/sendmail.htm See this in the code .Attachments.Add ("C:\test.txt") -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I'm sending out a new mail message and attaching the current excel worksheet. I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
I've seen the variations of the code begining with
Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) However, I can't get past this point without an error. It is not recognizing the outlook.application and responding with an error of "user defined type not defined". I am using Outlook 2003. "Ron de Bruin" wrote: You need other code for that See the Outlook Object model section on this page http://www.rondebruin.nl/sendmail.htm See this in the code .Attachments.Add ("C:\test.txt") -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I'm sending out a new mail message and attaching the current excel worksheet. I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
I use this in all my examples (late binding) because I get to many mails from people that say"It is not working"
Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem In my examples you not have to set a reference to the Outlook library in the VBE Below every example you can see how you must change the code if you want to use Early binding -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I've seen the variations of the code begining with Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) However, I can't get past this point without an error. It is not recognizing the outlook.application and responding with an error of "user defined type not defined". I am using Outlook 2003. "Ron de Bruin" wrote: You need other code for that See the Outlook Object model section on this page http://www.rondebruin.nl/sendmail.htm See this in the code .Attachments.Add ("C:\test.txt") -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I'm sending out a new mail message and attaching the current excel worksheet. I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
I still can't get the code to work by using either option(early or late
binding). I can't seem to get it to recognize the "outlook" portion of the code. I've tried selecting different references but that hasn't worked. I've copied some of your code ver batum and still comes up with errors at the same point. How specifically do set a reference to the Outlook library? "Ron de Bruin" wrote: I use this in all my examples (late binding) because I get to many mails from people that say"It is not working" Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem In my examples you not have to set a reference to the Outlook library in the VBE Below every example you can see how you must change the code if you want to use Early binding -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I've seen the variations of the code begining with Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) However, I can't get past this point without an error. It is not recognizing the outlook.application and responding with an error of "user defined type not defined". I am using Outlook 2003. "Ron de Bruin" wrote: You need other code for that See the Outlook Object model section on this page http://www.rondebruin.nl/sendmail.htm See this in the code .Attachments.Add ("C:\test.txt") -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I'm sending out a new mail message and attaching the current excel worksheet. I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
Do you have Outlook ?
With Outlook Express the code is not working -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I still can't get the code to work by using either option(early or late binding). I can't seem to get it to recognize the "outlook" portion of the code. I've tried selecting different references but that hasn't worked. I've copied some of your code ver batum and still comes up with errors at the same point. How specifically do set a reference to the Outlook library? "Ron de Bruin" wrote: I use this in all my examples (late binding) because I get to many mails from people that say"It is not working" Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem In my examples you not have to set a reference to the Outlook library in the VBE Below every example you can see how you must change the code if you want to use Early binding -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I've seen the variations of the code begining with Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) However, I can't get past this point without an error. It is not recognizing the outlook.application and responding with an error of "user defined type not defined". I am using Outlook 2003. "Ron de Bruin" wrote: You need other code for that See the Outlook Object model section on this page http://www.rondebruin.nl/sendmail.htm See this in the code .Attachments.Add ("C:\test.txt") -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I'm sending out a new mail message and attaching the current excel worksheet. I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
If you use Outlook see
http://www.rondebruin.nl/mail/problems.htm Good night -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Ron de Bruin" wrote in message ... Do you have Outlook ? With Outlook Express the code is not working -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I still can't get the code to work by using either option(early or late binding). I can't seem to get it to recognize the "outlook" portion of the code. I've tried selecting different references but that hasn't worked. I've copied some of your code ver batum and still comes up with errors at the same point. How specifically do set a reference to the Outlook library? "Ron de Bruin" wrote: I use this in all my examples (late binding) because I get to many mails from people that say"It is not working" Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem In my examples you not have to set a reference to the Outlook library in the VBE Below every example you can see how you must change the code if you want to use Early binding -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I've seen the variations of the code begining with Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) However, I can't get past this point without an error. It is not recognizing the outlook.application and responding with an error of "user defined type not defined". I am using Outlook 2003. "Ron de Bruin" wrote: You need other code for that See the Outlook Object model section on this page http://www.rondebruin.nl/sendmail.htm See this in the code .Attachments.Add ("C:\test.txt") -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I'm sending out a new mail message and attaching the current excel worksheet. I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add pdf attachment to new mail
Sorry for delayed response, yes I'm using Microsoft Office Outlook 2003.
"Ron de Bruin" wrote: If you use Outlook see http://www.rondebruin.nl/mail/problems.htm Good night -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Ron de Bruin" wrote in message ... Do you have Outlook ? With Outlook Express the code is not working -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I still can't get the code to work by using either option(early or late binding). I can't seem to get it to recognize the "outlook" portion of the code. I've tried selecting different references but that hasn't worked. I've copied some of your code ver batum and still comes up with errors at the same point. How specifically do set a reference to the Outlook library? "Ron de Bruin" wrote: I use this in all my examples (late binding) because I get to many mails from people that say"It is not working" Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem In my examples you not have to set a reference to the Outlook library in the VBE Below every example you can see how you must change the code if you want to use Early binding -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I've seen the variations of the code begining with Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) However, I can't get past this point without an error. It is not recognizing the outlook.application and responding with an error of "user defined type not defined". I am using Outlook 2003. "Ron de Bruin" wrote: You need other code for that See the Outlook Object model section on this page http://www.rondebruin.nl/sendmail.htm See this in the code .Attachments.Add ("C:\test.txt") -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Thanks" wrote in message ... I'm sending out a new mail message and attaching the current excel worksheet. I would like to also include a pdf file from a seperate folder. This is the code for the attachment of the excel document. What else would I have to include to find the pdf and place in the same email? Thanks ! Dim mySend As Integer mySend = MsgBox("Would you like to send document by email?", vbYesNo) If mySend = vbNo Then Exit Sub End If Application.Dialogs(xlDialogSendMail).Show End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
e Mail attachment | New Users to Excel | |||
how to add attachment in a CDO mail | 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 |