![]() |
#1
|
|||
|
|||
![]()
I have built a Word 2013 form which contains Legacy Controls, ActiveX Controls and the Date Picker from the default controls in the Developer tab.
I am relatively new building forms in Word. I hope this is not too wordy, but I am not sure how to explain it. This form is for Supervisors and managers to enter information about new Employees. Some of the information, Name, Supervisor name, start date, approving department head and email for department head. I have added several VBA Macros, one to read the name of the Department Head and get their email from Active Directory. This all works good, even when I open a new document from the template. I added a button at the bottom of the form to validate all required information, which as a dotm works great. But after saving the dotm file, and open the dotm as a new document the code that I entered in the button's click event is not there. It seems that the code is not being written to the Click event of the new form. If I unprotect the new document and click on the Developer Tab and view the code, All I have is Private Sub Submit_Click() and no code. Listed underneath the new Document in the VBA editor is the original template. Clicking on ThisDocument and viewing the code, I see my Private Sub Submit_Click() with all the code I wrote. I have gone into the Trust Center and enabled Macros and ActiveX. I have searched for answers, but found none that work. Am I doing something wrong? Any help would be appreciated. Thank you in advance for all your help. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
command button query | smalc | Word VBA | 2 | 03-16-2015 08:26 PM |
Command Button | knp11 | PowerPoint | 2 | 01-18-2015 01:41 PM |
![]() |
gerris | PowerPoint | 6 | 01-12-2015 10:17 AM |
![]() |
Claytocb | Excel Programming | 1 | 02-01-2013 12:20 AM |
![]() |
cksm4 | Word VBA | 7 | 02-27-2011 08:47 PM |