Show Comments with Tab (not mouseover) in protectet document

R

Richardt

I have a protectet document with formfields. The users need som help
and the helpmethod in formfields is not good enough (the users don't
se it). So I thougt of the comment object. It is perfect if you use
the mouse to select the formfields, but the users of cause use the
Tabkey (which is good *S*).

I have the code to use the comments in af msgbox (MsgBox
ActiveDocument.Comments(nr).Range), but then the user needs to press
the msgbox and they will pretty shure get tired of that after a short
time. So...

I have made this code, where I find the bookmark in the actual
formfield (ex. Komm_2 where 2 is the indexnummer of the comment). The
code will run when entering the formfield.

Sub Kommentar()

Dim nr As Integer

'Finder det aktive formularfelts bogmærke
If Selection.FormFields.Count = 1 Then
'No textbox but a check- or listbox
Svar = Selection.Bookmarks(Selection.Bookmarks.Count).Name
ElseIf Selection.FormFields.Count = 0 And Selection.Bookmarks.Count >
0 Then
Svar = Selection.Bookmarks(Selection.Bookmarks.Count).Name
End If

StartPos = InStr(1, Svar, "_", vbTextCompare)

nr = Mid(Svar, StartPos + 1)

MsgBox ActiveDocument.Comments(nr).Range

End Sub
 
W

Word Heretic

G'day (e-mail address removed) (Richardt),

form fields have help text to fulfil this function

(e-mail address removed) (Richardt) was spinning this yarn:
I have a protectet document with formfields. The users need som help
and the helpmethod in formfields is not good enough (the users don't
se it). So I thougt of the comment object. It is perfect if you use
the mouse to select the formfields, but the users of cause use the
Tabkey (which is good *S*).

I have the code to use the comments in af msgbox (MsgBox
ActiveDocument.Comments(nr).Range), but then the user needs to press
the msgbox and they will pretty shure get tired of that after a short
time. So...

I have made this code, where I find the bookmark in the actual
formfield (ex. Komm_2 where 2 is the indexnummer of the comment). The
code will run when entering the formfield.

Sub Kommentar()

Dim nr As Integer

'Finder det aktive formularfelts bogmærke
If Selection.FormFields.Count = 1 Then
'No textbox but a check- or listbox
Svar = Selection.Bookmarks(Selection.Bookmarks.Count).Name
ElseIf Selection.FormFields.Count = 0 And Selection.Bookmarks.Count >
0 Then
Svar = Selection.Bookmarks(Selection.Bookmarks.Count).Name
End If

StartPos = InStr(1, Svar, "_", vbTextCompare)

nr = Mid(Svar, StartPos + 1)

MsgBox ActiveDocument.Comments(nr).Range

End Sub

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

Replies offlist may require payment.
 
R

Richardt

Thank you for the replay, but the helpmethod in the formfield is not
sufficient. The user has to press F1 or look in the statusline - but
they overlook this options (especially the statusline whitch is to
small). Therefore the need for another way to giv them som help *S*
 
W

Word Heretic

G'day (e-mail address removed) (Richardt),

launch a browser window to a help file, then you always have an extra
window of help available.

(e-mail address removed) (Richardt) was spinning this yarn:
Thank you for the replay, but the helpmethod in the formfield is not
sufficient. The user has to press F1 or look in the statusline - but
they overlook this options (especially the statusline whitch is to
small). Therefore the need for another way to giv them som help *S*

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

Replies offlist may require payment.
 

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