Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-16-2014, 12:15 PM
PANTECH PANTECH is offline Word7 VBA- need userform screenshot to attach to email Windows 7 64bit Word7 VBA- need userform screenshot to attach to email Office 2007
Novice
Word7 VBA- need userform screenshot to attach to email
 
Join Date: May 2014
Posts: 4
PANTECH is on a distinguished road
Default Word7 VBA- need userform screenshot to attach to email


I need to be able to complete all fields on the userform then click the Submit command button and automatically have the screenshot of only the userform saved as an attachment to a predifined email. The below code will send an email attachment but there is no screen shot.

Please help

Code:
Private Sub Workbook_Open()
Application.Visible = True
frmWALKAROUND.Show
End Sub
Private Sub SpinButton1_Change()
TextBox1.Text = SpinButton1.Value
SpinButton1.Min = 0
SpinButton1.Max = 9
End Sub
Private Sub SpinButton2_Change()
TextBox2.Text = SpinButton2.Value
SpinButton2.Min = 0
SpinButton2.Max = 9
End Sub
Private Sub SpinButton3_Change()
TextBox3.Text = SpinButton3.Value
SpinButton3.Min = 0
SpinButton3.Max = 9
End Sub
 
Private Sub SpinButton4_Change()
TextBox4.Text = SpinButton4.Value
SpinButton4.Min = 0
SpinButton4.Max = 9
End Sub
 
Private Sub commandButton1_Click()
Dim OL As Object
Dim EmaiItem 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 = "Walkaround"
.To = "myemailaddress"
.Importance = olImportanceNormal
.Attachments.Add Doc.FullName
.Send
End With
Application.ScreenUpdating = True
Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing
Application.ActiveDocument.Close
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word7 VBA- need userform screenshot to attach to email Is it possible to take an input from a UserForm in one document to a UserForm in a do BoringDavid Word VBA 5 05-09-2014 09:08 AM
The Best Way to Decolor a Screenshot SQLUSA Word 1 07-15-2012 09:08 PM
attach multiple excel files to same email using send to option cbtac Excel 0 01-04-2012 07:20 AM
Word7 VBA- need userform screenshot to attach to email Having Touble Finding Word File When Trying to Attach to Email freetibet213 Word 3 12-28-2011 05:26 AM
Word7 VBA- need userform screenshot to attach to email How to type into a screenshot in word? greenwall Word 2 11-24-2011 02:14 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 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