Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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
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
e Mail attachment La Blonde New Users to Excel 3 April 12th 10 04:05 PM
how to add attachment in a CDO mail Julaf Excel Discussion (Misc queries) 20 August 19th 08 04:36 PM
mail and attachment Jithu Excel Discussion (Misc queries) 1 July 9th 07 12:38 PM
E-Mail attachment to same e-mail address in Outlook Vick Excel Discussion (Misc queries) 4 May 17th 07 07:53 PM
how to e-mail with an attachment using hotmail Excel not working with hotmail Excel Worksheet Functions 0 February 6th 05 06:35 PM


All times are GMT +1. The time now is 09:36 PM.

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

About Us

"It's about Microsoft Excel"