Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 15th, 2005, 10:16 AM
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mail documents automatically

Hello all,

Apologies for posting this here but I don’t know which other thread is best to post in!

I have a document that is set out as a form to be in filled using form properties in word 2000
In the document is a check box that should, when selected by the user, email the document to a specific email address.

I created the macro to do this by recording my actions, however, I get an outlook new mail message with the document as an attachemt with no email address showing.

What I what to be able to do is have this document sent without user interaction and to the email address I have recorded in the macro.

If anyone can help I would be over the moon as this is driving me mad.

Here is the code the macro created:

Sub mailtofacilitieshelpdesk()
'
' mailtofacilitieshelpdesk Macro
' Macro recorded 15/09/2005 by John
'
    ActiveDocument.SendMail
End Sub

Regards

John
 
Old September 17th, 2005, 04:28 PM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

What you could try is this:
-create a reference to the Microsoft Excel 10.0 Object Libary (Tools>References)

ActiveDocument.SendMail
Excel.Application.Sendkeys "[email protected]" , wait 'your email address
Excel.Application.Sendkeys "%S" ' alt S to send





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
send mail automatically surendran PHP How-To 1 September 21st, 2007 06:34 AM
How to send mail for each week/month automatically lakshmi_annayappa ASP.NET 1.0 and 1.1 Professional 1 May 25th, 2007 02:43 AM
Automatically Saving sending an e-mail Brendan Bartley Access 4 August 4th, 2005 05:28 AM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.