MikeXna
asked on
Word Templates - Advice for automating long documents
Hello Experts,
I am still planning my office WordPerfect to Word migration at work.
Its moving along but i am still doubting my approach to converting some complex templates, leaving me asking this question.
VB User forms or is there a reusable/easier/no code solution?
Folks like message boxes. I don't know why.
I have a lot of users who are used to some automation to help them fill out a form. Moving the curser from place to place with helpful message boxes along the way.
So, I am looking to convert a bunch WordPerfect Templates to MS Word Templates. The templates are pre formatted long documents with variable text.
The user experience in the WordPerfect templates is pretty complex.
They typically start automatically with a series prompts or keyboard merges, they use logic such if/else and for loops as well as y/n to put in dynamic text while take the user from bookmark to bookmark in the document, even allowing the user to type in a paragraph instead of in a little message box or small field.
I recently learned how to make macro enabled templates in Word that open to a user form with fields. My VB user form has a button on the bottom that inserts the values of the form to bookmarks in the document and closes the form.
It works pretty good. I even figured out how to use checkboxes that dynamically insert different building block auto text to a desired bookmark in the doc. So, I know how to use the developer tab in the ribbon enough to be dangerous but I am still learning. Now that I can do it I replicated it for other templates, but at some point, I foresee that I will want to get out of the template business and train secretaries to make temples. I just can't picture secretaries using VB, ever with instructions and sample code. It just feels wrong. hmmmm
But I can't help wonder if there is another or easier way to automate some less complicated documents.
I noticed some interesting features in Words mail merge that I have yet to duplicate in a .dotm template. For example: "Ask" and "Fill In".
Is it possible to create a .dotm that opens the preformated doc that takes users from fill in to fill in?
Your thoughts are much appreciated.
A Sample "Hello Word" would be even more appreciated.
Thanks Again!
I am still planning my office WordPerfect to Word migration at work.
Its moving along but i am still doubting my approach to converting some complex templates, leaving me asking this question.
VB User forms or is there a reusable/easier/no code solution?
Folks like message boxes. I don't know why.
I have a lot of users who are used to some automation to help them fill out a form. Moving the curser from place to place with helpful message boxes along the way.
So, I am looking to convert a bunch WordPerfect Templates to MS Word Templates. The templates are pre formatted long documents with variable text.
The user experience in the WordPerfect templates is pretty complex.
They typically start automatically with a series prompts or keyboard merges, they use logic such if/else and for loops as well as y/n to put in dynamic text while take the user from bookmark to bookmark in the document, even allowing the user to type in a paragraph instead of in a little message box or small field.
I recently learned how to make macro enabled templates in Word that open to a user form with fields. My VB user form has a button on the bottom that inserts the values of the form to bookmarks in the document and closes the form.
It works pretty good. I even figured out how to use checkboxes that dynamically insert different building block auto text to a desired bookmark in the doc. So, I know how to use the developer tab in the ribbon enough to be dangerous but I am still learning. Now that I can do it I replicated it for other templates, but at some point, I foresee that I will want to get out of the template business and train secretaries to make temples. I just can't picture secretaries using VB, ever with instructions and sample code. It just feels wrong. hmmmm
But I can't help wonder if there is another or easier way to automate some less complicated documents.
I noticed some interesting features in Words mail merge that I have yet to duplicate in a .dotm template. For example: "Ask" and "Fill In".
Is it possible to create a .dotm that opens the preformated doc that takes users from fill in to fill in?
Your thoughts are much appreciated.
A Sample "Hello Word" would be even more appreciated.
Thanks Again!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There is a Calendar control that ships with Access, so you might have that. However I wouldn't recommend it without having a separate textbox to display the return vale date because it isn't obvious if it has been updated since a different year or month has been selected.
By Wizard I just mean a VBA form or VBA dialog - whatever is best to call them.
That idea is just a simple generic data entry tool where the dialog looks for occurrences of the variables in the document eg [Contact name] and then offers those in the dialog with a text box for each.
There are a huge number of additional controls you can use in your VBA as you know, (eg date pickers, Rich text boxes, etc) both built in and 3rd party, but I try to avoid them if possible as reliability dips the more external functions you use. ie things that work on your machine dont always work on others and it starts to get version dependent.
That idea is just a simple generic data entry tool where the dialog looks for occurrences of the variables in the document eg [Contact name] and then offers those in the dialog with a text box for each.
There are a huge number of additional controls you can use in your VBA as you know, (eg date pickers, Rich text boxes, etc) both built in and 3rd party, but I try to avoid them if possible as reliability dips the more external functions you use. ie things that work on your machine dont always work on others and it starts to get version dependent.
ASKER
This is great feedback.
Sound like I will likely be in the template biz for a while.
I have been enjoying it so far.
So far VBA in The developer tab has been suiting my needs. I do with my vb user forms where a little more rich looking.
Are the controls in visual studio better?
For example, their does not seem to be a vba date picker for a user form, however, I did find a control on my computer which is 99% of what I want. It just seems to lack the ability to default to today's date.
I also wish my longer vb form fields supported controls to format the text, add hyperlinks? Etc.
In the meantime, I guess users could add them after they fill out the form and edit the doc.
Word seems to refer to the controls in vb as legacy which concerns me some, but so far I do not a better built in solution without using a 3rd party addin.
@charlie, that is good advice to offer the secretaries. I do not have a "wizard" yet. I have been coding manually in vba.
Did you have a partular wizard in mind?
Thanks!