![]() |
|
#1
|
|||
|
|||
|
Hi all I have got a submit button on my word document that once clicked sends to a specific Email, is it possible that once clicked the button disappears and shows Form Submitted? my current code is. Code:
Private Sub SubmitButton1_Click()
Label1.Visible = True
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 = "Form submited"
.Body = ""
.To = "none@none.com"
.Importance = olImportanceNormal
.Attachments.Add Doc.FullName
.Send
End With
Application.ScreenUpdating = True
Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Submit Button Req that populates email address
|
phorsley | Word VBA | 1 | 10-17-2017 04:50 PM |
Code for column button?
|
cloudforgiven | Excel Programming | 1 | 12-18-2016 07:42 AM |
| Submit to Email Command Button | rob7676 | Word VBA | 0 | 08-20-2015 05:05 AM |
| VBA Code in a UserForm module to delete a Command Button which opens the userform | Simoninparis | Word VBA | 2 | 09-21-2014 03:50 AM |
VBA Code for a SUBMIT button in a Word form
|
BlueMax | Word VBA | 3 | 08-07-2013 06:26 AM |