#1
|
|||
|
|||
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 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 |
#2
|
||||
|
||||
I don't use Outlook, so I can't say for sure, but you might get the results you're after by changing:
.Send to: .Display Note that you can also programmatically add more attachments via additional '.Attachments.Add' lines. PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks...didn't work, however.
Quote:
I'm not sure what you mean by using '.Attachments.Add' lines. I tried plunking the code into a new button and it didn't do anything. Quote:
|
#4
|
|||
|
|||
Nevermind!
Figured it out...works great!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
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 |