Help: Advanced Template (dotx) Functionality

D

DocBadwrench

Greetings community members,

I am in the process of updating some very old institutional templates using
Word 2007's improved functionality. There is a lot to like in the new ways
that you can control access to the forms. Wherever possible, I am using the
Controls (found in the Developer ribbon).

Basic Facts: I'm assembling a large (15-20 pages) DOTX document that is rife
with fields that require entry by the user. The document contains Plain Text
fields, Rich Text fields, Numerous Drop-Down boxes, and a few Calendar Picker
fields. Eventually, I would like to Protect the document against all
formatting changes except the field-data.


ISSUE #1 : MOVING WITH THE TAB KEY THROUGH RICH TEXT FIELDS

The beginning of my document has a number of blank Plain Text fields that
require basic facts like contact information and what-not. I can enter data,
hit the TAB key, then enter more data, just fine. However, once I move past
those values and on to the Rich Text fields, the TAB key ceases to "move me
along" the fields, and rather behaves as you would expect the TAB key to
outside a form-field.

I'm sure this is intentional (these *are* rich text settings, right?), but
even so - is there a way to cause the DOTX file to treat the field movement
the way I want it to? Failing that, is there at least a way to stop the field
itself from getting "pushed" along the default tab stops? I mention THAT
because some of these fields will not be filled out (they are entirely
optional), so the users will naturally hit the TAB key and it won't behave
the way they've come to expect it.

It is vital that I retain the formatting options, as the large amounts of
data entered into some of these fields will need to have italics and other
formatting options, though, ironically, not tabs.


ISSUE #2 : MOUSE-OVER TEXT POP-UPS

Within Microsoft Excel, you can "Insert Comment" beautifully. If I mouse
over the cell, a non-printable text field will pop-up. I need to replicate
this functionality within Microsoft Word. If I can't exactly get what I want
(a question-mark image that, when moused over, informs the user of template
information), I would certainly live with a way to create NON-PRINTABLE text.
It makes the WYSIWYG nature of Word a lot more difficult, but at least I
could enter these elements at the END, after I've already figured out layout
issues.


ISSUE #3 : DYNAMICALLY ADDING ROWS TO TABLES

This document has a few tables that may (or may not) need to be filled out,
depending upon the user's needs. As this will ultimately be protected against
everything except form field entries, it means that I have to create a number
of rows (with fields within) that may or (more likely) may not be used.

What I'd RATHER do is create a way to click a button and add a row (with
accompanying fields). However, this strikes me as the sort of thing that may
be out of the core Word functionality, which is why it's #3 on the list.


CLOSING SUMMARY

These are the outstanding issues that I haven't yet resolved. I'd appreciate
any help you community members can offer.

Thanks in advance,
Matt Warren (DocBadwrench)
 
D

DocBadwrench

I have been shopping my problem around to a few forums in an attempt to find
a solution.

Issue #2 is fixed thanks to being sent to this page
(http://www.ehow.com/how_4779622_mouseover-microsoft-word.html). Issue #3 I
have simply dropped, because it's too much of a pain and it's not a
show-stopper.

So, regarding Issue #1: I still don't know exactly what to do and it *is*
crucial, since the people filling this form out are completely used to
TABbing forward and backward through forms. Now, suddenly, when they get to a
Rich Text Field, that functionality is altered (for good reason, obviously,
since it's RTF). However, I would have loved a way to tell Word to disallow
the TAB function (perhaps through a checkbox).

A great gentleman (Alain) on Experts Exchange posted this:

You can try capturing the "ContentUpdating" event for the rich text content
control objects in VBA. If the user has entered the tab key, you can pick up
the change from the event, and instead cancel the change and set focus to the
next control on your form. Details are here
http://msdn.microsoft.com/en-us/lib....word.contentcontrolbase.contentupdating.aspx


While this appears to be great direction, I'm not terribly skilled at
scripting and need a more bare-bones instruction. Go here, click this, enter
this, etc. I'm thoroughly lost, even after reading that document along with a
number of other linked documents.

If any of you know of related instructions that can hand-hold the user a bit
more, I'd greatly appreciate it.

Thanks in advance.
 
D

DocBadwrench

Another thought:

Do any of you know of an online community where you can subcontract out
functionality to people more clever than I? I could certainly justify
expending a little money if it's going to save me some time.
 
D

Doug Robbins - Word MVP

Hi Matt,

Send me your template and I will have a look at it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
D

Doug Robbins - Word MVP

Issue #3 is quite do-able.

Sub addrow()
'
' Macro created 02/02/03 by Doug Robbins
' To add a new row to a table containing formfields in every column
' automatically on exit from the last cell in the present last row of the
table
Dim rownum As Integer, i As Integer
ActiveDocument.Unprotect
ActiveDocument.Tables(1).Rows.Add
rownum = ActiveDocument.Tables(1).Rows.Count
For i = 1 To ActiveDocument.Tables(1).Columns.Count
ActiveDocument.FormFields.Add
Range:=ActiveDocument.Tables(1).Cell(rownum, i).Range,
Type:=wdFieldFormTextInput
Next i
ActiveDocument.Tables(1).Cell(ActiveDocument.Tables(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.FormFields(1).ExitMacro =
"addrow"
ActiveDocument.Tables(1).Cell(ActiveDocument.Tables(1).Rows.Count,
1).Range.FormFields(1).Select
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True

End Sub

There are various ways in which it can be enhanced, such as popping up a
message box asking the user if they want to add another row, dealing with
dropdown formfields, etc.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
D

DocBadwrench

Thanks Doug. I've included a link to a very scaled down version of my
document, that includes an example of what I'm encountering.

http://mattwarren.net/forumimages/docx_field_tab_problem.docx

As regards your other very helpful suggestion, I'm rather confused at
exactly *how* I enter VBA text itself. I'm going to look around for a VBA for
dummies book that might help. :)

Again, thanks! Let me know if I'm being unclear.
 
D

Doug Robbins - Word MVP

I'll take a look at the link.

As for what to do with macros, see the article "What do I do with macros
sent to me by other newsgroup readers to help me out?†at:

http://www.word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

In the case of that macro, you would need to set it to be run on exit from
the last formfield in the table.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top