Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tab to the next form field

2 views
Skip to first unread message

Eric

unread,
Jan 2, 2008, 8:46:49 PM1/2/08
to
I have a legal document set up as protected for filling out forms, and some
of the field forms have formatting applied to dates & currencies. When I
populate the document programmatically, the field formats I need
aren't applied until I manually tab through the doc. I tried the code below
but it doesn't do the trick.

TIA,
Eric

Private Sub TabThruForm(doc As Word.Document)
Dim k As Integer
Dim frmFlds As Word.FormFields
Set frmFlds = doc.FormFields
For k = 1 To frmFlds.Count
If k <> frmFlds.Count Then frmFlds(k).Next.Select
Next k
frmFlds(1).Select
End Sub


Tony Strazzeri

unread,
Jan 4, 2008, 7:44:45 PM1/4/08
to
Hi Eric,

Can you show us the code you are using to set the content
programmatically?

Also exactly what formatting you have set on the fields and what
content you are applying.

What version of Word are you using?

On my PC Using Word XP (2002) with SP3 it works OK. I set a field to
format a date in the form "d MMMM yyyy"
when I applied the current date to it using frmFlds(k).Result = Now()
it displayed the val;ue in the formfield as "5 January 2008".

Hope this helps.

Cheers
TonyS.

0 new messages