PC Review


Reply
Thread Tools Rate Thread

Command Button to send word email attachment

 
 
=?Utf-8?B?SEVMUA==?=
Guest
Posts: n/a
 
      27th Dec 2006
I have created a command button "submit" on a word document and have tried to
create a macro to email it, however i have done something wrong as the
attachment is not being created. Could someone please help me ASAP!

Sub CommandButton1_Click()

Dim Email As Object
Dim Attachment As String

Set Email = CreateObject("Outlook.Application") 'Assign Outlook application
to variable


With Email.CreateItem(olMailItem)
.to = "<>" 'email address
.Subject = "Incident Report" 'Something for the subject Field
.body = ActiveDocument
.Display = Attachment

Options.SendMailAttach = True


End With
 
Reply With Quote
 
 
 
 
Rock
Guest
Posts: n/a
 
      27th Dec 2006
"HELP" <(E-Mail Removed)> wrote in message
news:29DC6315-FB1A-4C63-ABD9-(E-Mail Removed)...
>I have created a command button "submit" on a word document and have tried
>to
> create a macro to email it, however i have done something wrong as the
> attachment is not being created. Could someone please help me ASAP!
>
> Sub CommandButton1_Click()
>
> Dim Email As Object
> Dim Attachment As String
>
> Set Email = CreateObject("Outlook.Application") 'Assign Outlook
> application
> to variable
>
>
> With Email.CreateItem(olMailItem)
> .to = "<>" 'email address
> .Subject = "Incident Report" 'Something for the subject Field
> .body = ActiveDocument
> .Display = Attachment
>
> Options.SendMailAttach = True
>
>
> End With



You might want to post to a Word newsgroup.

--
Rock [MVP - User/Shell]

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
send to mail recipient (as attachment) command button on toolbar =?Utf-8?B?cGhpbGxpcDk=?= Microsoft Access Reports 4 12th Apr 2007 08:44 PM
Send email with attachment from command line David Allen Microsoft Outlook 0 3rd Jul 2006 11:11 PM
Add email attachment to command button =?Utf-8?B?U2hpbmth?= Microsoft Excel Misc 5 6th Oct 2005 06:27 PM
command button to create a "send as attachment" email. =?Utf-8?B?cGF0dHkgQCBib2JyaWNr?= Microsoft Excel Worksheet Functions 1 13th Oct 2004 01:17 PM
Is it possible to send and email with attachment from Command Line? Chris Microsoft Outlook 1 6th Jan 2004 02:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:49 PM.