![]() |
#1
|
|||
|
|||
![]()
Hi. I am really new to vba, and using forms controls and vba with Outlook, in particular.
I've created a single userform that has 3 check boxes in it. I just need those three boxes--not the entire userform window--to sit in the body of the email so the recipient can check the box that applies to their situation and reply to the email. I'm using UserForm1.Show in the code that brings up the template I'd like to use, but it's just showing it in the box the three checkboxes were created in. Here's the entire code I have. It's opening a template and inserting the current date, then I added the userform1.show command at the end. Please help me get the three checkboxes into the body of the email. Thanks! ![]() Code:
Sub WIBWOverpaymentNotice() Set newItem = Application.CreateItemFromTemplate("S:\AR and Recon\Overpayment templates\WIBW Overpayment Notice .oft") newItem.Display Set newItem = Nothing Dim objOL As Outlook.Application Dim objNS As Outlook.NameSpace Dim objItem As Object Dim strStamp As String On Error Resume Next Set objOL = Application Set objItem = objOL.ActiveInspector.CurrentItem If Not objItem Is Nothing Then If objItem.BodyFormat = olFormatHTML Then Set objNS = objOL.Session strStamp = Format(Now, "Long Date") objItem.HTMLBody = Replace(objItem.HTMLBody, _ "datehere", _ strStamp) End If End If Set objOL = Nothing Set objNS = Nothing Set objItem = Nothing UserForm1.Show End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
SaneMan | Word VBA | 5 | 10-14-2011 05:12 AM |
Outlook 2007 Default Template | kyklico | Outlook | 0 | 07-09-2011 05:01 PM |
Outlook userform validation help | aiwnjoo | Outlook | 0 | 12-08-2010 12:57 AM |
Displaying data from spreadsheet in Userform | darklide | Excel | 0 | 03-12-2010 05:42 AM |
[Word 2003] Macro's and a UserForm | xanuex | Word VBA | 0 | 10-19-2009 05:42 AM |