Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-11-2013, 03:02 PM
antipelagian antipelagian is offline Email submit that... Windows XP Email submit that... Office 2010 32bit
Novice
Email submit that...
 
Join Date: Feb 2013
Location: Ohio
Posts: 4
antipelagian is on a distinguished road
Default Email submit that...

What I'd like to do:
Find script/code for a command button that creates an email, attaches the active form but does NOT send the email. I'd like it to create the email, attach the file but pop up the email so the user can attach supporting documentation then manually send it.

Where I'm at:
I'm pretty new to making forms via Word...I'm used to making forms in LiveCycle Designer using javascript, so I'm kind of lost tweaking the code in Word. Here's what I have:

Code:
Dim OL As Object 
Dim EmailItem As Object 
Dim Doc As Document 
 
Application.ScreenUpdating = False 
Set OL = CreateObject("Outlook.Application") 
Set EmailItem = OL.CreateItem(olMailItem) 
Set Doc = ActiveDocument 
Doc.Save 
 
With EmailItem 
    .Subject = "Contract Initiation Form has been submitted" 
    .Body = "Please review the attached Form" 
    .To = "example@this.com" 
     
    .Cc = "example@this.com" 
    .Attachments.Add Doc.FullName 
    .Send 
End With 
 
Application.ScreenUpdating = True 
 
Set Doc = Nothing 
Set OL = Nothing 
Set EmailItem = Nothing 
 
End Sub
I'm trying to understand what each part of this code does...but for the life of me, I can't figure how to prevent the automated email submission. Do I tweak .Send? I tried deleting it that didn't help.

Bonus Points:


Can you create pop up warning windows via Word form? I'd like a pop-up that presents itself after the submit button is clicked reminding the user to attach additional documents...this is just for bonus brownie points

Last edited by macropod; 02-11-2013 at 04:39 PM. Reason: Added code tags & formatting
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Email submit that... Outlook Email messsages do not show sender unless you open the email jdesnoue Outlook 5 04-22-2013 09:10 PM
Mail Merge to email, changing images on email layout ginelli Mail Merge 18 02-23-2013 09:47 AM
Email submit that... Outlook won't reply/forward email from one email address rluna68 Outlook 2 01-07-2013 12:42 PM
Can't create new email or access email acounts Outlook 2003 onthebeaches Outlook 1 02-20-2012 10:21 PM
How Many Email Addresses Can You email at one time in Outlook zinfandel72 Outlook 2 08-04-2008 06:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft