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" <(E-Mail Removed)> wrote in message news:66616982-C1FC-4B89-B253-(E-Mail Removed)...
> > 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
>