You can use the VBA event Document_Open to achieve this. You will need to save the document as a .docm
file for it to work (Word Macro-Enabled Document.)
Press Alt+F11, and add this code to the ThisDocument
object:
Sub Document_Open()
MsgBox "Don't forget to amend the fields!"
End Sub
You can do a lot more than just show a MsgBox of course.
To expand upon this and actually populate data from the prompt, you could use input boxes or a custom form. I'll go through input boxes here, as forms are a bit longer and more complicated.
First, we need to add form fields for the data we actually want to populate. I'll show you the most compatible way to do this.
You may need to enable the Developer
toolbar for this. Some instructions to cover different versions of Word are here, for mine, I had to enable it here:
Next, we'll add the form field:
Right click the new form field and click Properties
. Give the field a Bookmark
that clearly references it:
Now, in VBA, we can change this value using text from an input box:
Sub Document_Open()
ActiveDocument.FormFields("CompanyName").Result = InputBox("Enter your company name here")
End Sub
You can obviously add as many of these as desired.
Note: The grey background - field shading
- does not show up in print, but if you want to remove it you can click your field and click this button in the same place you added it from:
"Prompting you to fill in the fields" is ambiguous. Are you looking for simply a reminder message (as described in Jonno's answer), or a requirement to fill in the fields, which are prompted, before it will allow you to create the quote? – fixer1234 – 2016-02-03T20:28:46.470
As a requirement to fill in the fields. Thanks for the suggestion, I will edit my question. – rodsarria – 2016-02-03T20:43:38.547