Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-13-2019, 07:29 AM
Kieranf Kieranf is offline Problem with submitting a word form via email. Windows 7 64bit Problem with submitting a word form via email. Office 2019
Novice
Problem with submitting a word form via email.
 
Join Date: Feb 2019
Posts: 1
Kieranf is on a distinguished road
Default Problem with submitting a word form via email.

I have created the following code (via a lot of searching) but the attached form is blank. Can anyone see what is wrong?





Code:
 
Private Sub CommandButton1_Click()
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
 
With EmailItem
.Subject = "Hello"
.Body = "Insert message here or just send"
 
.To = "acas-media@media.co.uk"
.Importance = olImportanceNormal 'Or olImprotanceHigh Or olImprotanceLow
.Attachments.Add Doc.FullName
.Display
.Save
 
 
End With
 
Application.ScreenUpdating = True
 
Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing
 
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling info from an email into a form on Word jlamx Word 1 07-07-2017 08:24 PM
Problem with submitting a word form via email. Adding email button to Word form leilers Word 5 01-09-2012 03:21 PM
Submitting HTML form data in Outlook 2010 ramen Outlook 0 12-15-2011 02:29 PM
Problem with submitting a word form via email. Word Form Problem firewatch Word 1 11-08-2011 02:23 AM
MS Word form - email button floydwood Word VBA 0 05-10-2009 04:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:02 AM.


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