A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Send message with attachment



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 19th 08, 07:19 PM posted to microsoft.public.outlook.program_vba
Courtney[_2_]
external usenet poster
 
Posts: 1
Default Send message with attachment

I need to be able to automate creating a message, attaching a file, and sending the message without manual intervention. I can create the message with an attachment in several different ways, but I haven't been able to find a way to automate the sending of it. I have been able to create a macro in Outlook and manually run it successfully, but I can't run it using the outlook /autorun switch. I found the outlook switch /altvba VbaProject.OTM, but I can't figure out how to use it.

Does anyone have any suggestions on how I can accomplish this task?

Thank you very much for your assistance!

Courtney
  #2  
Old December 19th 08, 10:28 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Send message with attachment

/altvba forces Outlook to open with a specific VBA project file instead of
the default one.

If you have a VBA project that calls your macro in the Application_Startup()
event you will have most of what you want. The call to your macro must be in
that event handler in the ThisOutlookSession class and Outlook must be
configured to allow running VBA without prompting.

Then if you have a vbs file that starts Outlook with that special project
you can run it from a task scheduler. Of course since the script couldn't
know when Outlook had initialized and sent the message you'd need code to
start a SyncObject to send the message and a handler to know when the synch
was finished, and then to close Outlook.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Courtney" courtney[dot]piratzky[at]gasoc[dot]com wrote in message
...
I need to be able to automate creating a message, attaching a file, and
sending the message without manual intervention. I can create the message
with an attachment in several different ways, but I haven't been able to
find a way to automate the sending of it. I have been able to create a
macro in Outlook and manually run it successfully, but I can't run it using
the outlook /autorun switch. I found the outlook switch /altvba
VbaProject.OTM, but I can't figure out how to use it.
Does anyone have any suggestions on how I can accomplish this task?

Thank you very much for your assistance!

Courtney


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can send email with attachment receiver cannot open attachment saffi Outlook - General Queries 8 December 5th 07 11:06 AM
Message As An Attachment JoeCL Outlook - Installation 1 August 23rd 06 06:05 PM
Recieving a message with attachment and I can't view message body mytwosweetpeas Outlook - General Queries 0 July 7th 06 08:48 PM
See attachment line in new message? cjlatta Outlook - Installation 1 June 16th 06 12:16 AM
Adding attachment to message David Wendt Add-ins for Outlook 5 April 24th 06 03:28 PM


All times are GMT +1. The time now is 07:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.