PC Review


Reply
Thread Tools Rate Thread

Create a "Send" button

 
 
=?Utf-8?B?TGVzbGll?=
Guest
Posts: n/a
 
      8th Oct 2007
I have created a form using Excel. I would like the people who fill out his
form to click a “Submit This Form” button at the top of his form and have
this button e-mail the form file to me (with the form file as an attachnemt
to the e-mail).



I need to know how to create a button in an Excel file, so that when you
click this button, it generates an e-mail addressed to a pre-specified
recipient (e-mail would be pre-addressed to me) with the completed form file
as an attachment to the e-mail.


I have a lot of experience working with Excel, so if possible, I’d prefer to
do this using a hyperlink and the capabilities of Excel, without using Visual
Basic. Is there a way to do what I need to do using Excel?
If Visual Basic is the only way this can be done, can you walk me through
the process of creating a button (and help me write the macro language) to do
this? (I have very little experience with Visual Basic!)

Thank you so much for your help!

 
Reply With Quote
 
 
 
 
Sangel
Guest
Posts: n/a
 
      8th Oct 2007
On Oct 8, 4:51 pm, Leslie <Les...@discussions.microsoft.com> wrote:
> I have created a form using Excel. I would like the people who fill out his
> form to click a "Submit This Form" button at the top of his form and have
> this button e-mail the form file to me (with the form file as an attachnemt
> to the e-mail).
>
> I need to know how to create a button in an Excel file, so that when you
> click this button, it generates an e-mail addressed to a pre-specified
> recipient (e-mail would be pre-addressed to me) with the completed form file
> as an attachment to the e-mail.
>
> I have a lot of experience working with Excel, so if possible, I'd prefer to
> do this using a hyperlink and the capabilities of Excel, without using Visual
> Basic. Is there a way to do what I need to do using Excel?
> If Visual Basic is the only way this can be done, can you walk me through
> the process of creating a button (and help me write the macro language) to do
> this? (I have very little experience with Visual Basic!)
>
> Thank you so much for your help!


Leslie,

Follow the link and you will be able to complete the task with no
problem.(not a walkthru though)

http://www.ozgrid.com/VBA/send-email.htm

 
Reply With Quote
 
Sangel
Guest
Posts: n/a
 
      8th Oct 2007
On Oct 8, 4:51 pm, Leslie <Les...@discussions.microsoft.com> wrote:
> I have created a form using Excel. I would like the people who fill out his
> form to click a "Submit This Form" button at the top of his form and have
> this button e-mail the form file to me (with the form file as an attachnemt
> to the e-mail).
>
> I need to know how to create a button in an Excel file, so that when you
> click this button, it generates an e-mail addressed to a pre-specified
> recipient (e-mail would be pre-addressed to me) with the completed form file
> as an attachment to the e-mail.
>
> I have a lot of experience working with Excel, so if possible, I'd prefer to
> do this using a hyperlink and the capabilities of Excel, without using Visual
> Basic. Is there a way to do what I need to do using Excel?
> If Visual Basic is the only way this can be done, can you walk me through
> the process of creating a button (and help me write the macro language) to do
> this? (I have very little experience with Visual Basic!)
>
> Thank you so much for your help!


Try this:

open your workbook
do ALT f11
in your workbook do insert and click module
doble click on the module you inserted
copy/paste this code
Sub Mail_workbook_Outlook_1()
'Working in 2000-2007
'This example send the last saved version of the Activeworkbook
Dim OutApp As Object
Dim OutMail As Object



Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)



On Error Resume Next
With OutMail
.To = "email here"
.CC = "email here"
.BCC = ""
.Subject = "Report"
.Body = "what will fill the body here"
.Attachments.Add ActiveWorkbook.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Display 'or use .Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub

save
go to the worksheet
create a square figure as you would in drawing in excel
right click on it and click asign macro
choose the macro you created "Mail_workbook_Outlook_1"
now when you click the square you created it will run the macro. it
will open outlook and you send the page.

cheers

 
Reply With Quote
 
=?Utf-8?B?TGVzbGll?=
Guest
Posts: n/a
 
      8th Oct 2007
Thank you. I'll try both of your suggestions!

"Sangel" wrote:

> On Oct 8, 4:51 pm, Leslie <Les...@discussions.microsoft.com> wrote:
> > I have created a form using Excel. I would like the people who fill out his
> > form to click a "Submit This Form" button at the top of his form and have
> > this button e-mail the form file to me (with the form file as an attachnemt
> > to the e-mail).
> >
> > I need to know how to create a button in an Excel file, so that when you
> > click this button, it generates an e-mail addressed to a pre-specified
> > recipient (e-mail would be pre-addressed to me) with the completed form file
> > as an attachment to the e-mail.
> >
> > I have a lot of experience working with Excel, so if possible, I'd prefer to
> > do this using a hyperlink and the capabilities of Excel, without using Visual
> > Basic. Is there a way to do what I need to do using Excel?
> > If Visual Basic is the only way this can be done, can you walk me through
> > the process of creating a button (and help me write the macro language) to do
> > this? (I have very little experience with Visual Basic!)
> >
> > Thank you so much for your help!

>
> Try this:
>
> open your workbook
> do ALT f11
> in your workbook do insert and click module
> doble click on the module you inserted
> copy/paste this code
> Sub Mail_workbook_Outlook_1()
> 'Working in 2000-2007
> 'This example send the last saved version of the Activeworkbook
> Dim OutApp As Object
> Dim OutMail As Object
>
>
>
> Set OutApp = CreateObject("Outlook.Application")
> OutApp.Session.Logon
> Set OutMail = OutApp.CreateItem(0)
>
>
>
> On Error Resume Next
> With OutMail
> .To = "email here"
> .CC = "email here"
> .BCC = ""
> .Subject = "Report"
> .Body = "what will fill the body here"
> .Attachments.Add ActiveWorkbook.FullName
> 'You can add other files also like this
> '.Attachments.Add ("C:\test.txt")
> .Display 'or use .Send
> End With
> On Error GoTo 0
> Set OutMail = Nothing
> Set OutApp = Nothing
> End Sub
>
> save
> go to the worksheet
> create a square figure as you would in drawing in excel
> right click on it and click asign macro
> choose the macro you created "Mail_workbook_Outlook_1"
> now when you click the square you created it will run the macro. it
> will open outlook and you send the page.
>
> cheers
>
>

 
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
Create "send to mail recipient as attachment" button inside word d =?Utf-8?B?Y3JhenltZnI=?= Microsoft Word Document Management 11 25th Apr 2007 09:26 PM
How do I create a "Send" button that uses a record's "e-mail" fiel =?Utf-8?B?TkRNYWM=?= Microsoft Access Forms 2 12th Jul 2006 12:48 AM
create e-mail proofing bypass button "ignore all, just send" =?Utf-8?B?ciBmcmFuaw==?= Microsoft Outlook Form Programming 1 28th Oct 2005 09:42 PM
Create a "send and delete" button =?Utf-8?B?QW5uIEhvbG1lcw==?= Microsoft Outlook BCM 0 5th Jul 2005 07:03 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


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:41 AM.