View Single Post
  #3   Report Post  
Posted to microsoft.public.word.pagelayout
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Input mask for form fields in Word

Hi lee,

I believe I've already answered this for you at: http://www.tek-tips.com/viewthread.c...1541593&page=1

If you're going to post the same query in multiple forums, you should say so. - and acknowledge whatever advice you've already
received.

--
Cheers
macropod
[MVP - Microsoft Word]

PS: A simpler form of the Function I posted at tek-Tips is:
Function StrToDate(FFname As String) As String
Dim TmpStr
TmpStr = ActiveDocument.FormFields(FFname).Result
StrToDate = TmpStr
If Len(TmpStr) = 6 Then
If CDate(Left(TmpStr, 2) & "/" & Mid(TmpStr, 3, 2) & "/" & Right(TmpStr, 2)) Then _
StrToDate = Format(CDate(Left(TmpStr, 2) & "/" & Mid(TmpStr, 3, 2) & "/" & Right(TmpStr, 2)), "DD-MM-YYYY")
End If
End Function


"Lee S." wrote in message ...

Hi,
I was asked to create a new form that has a number of date fields. The
boss wants to be able to type 050209 and have it appear as 5/2/09. I
know that input masks are available in MS Access, but how do I put
something like this in a form field in MS Word? If anybody has any
suggestions, I'd really appreciate it.

Thanks,

Lee




--
Lee S.