Results 1 to 3 of 3

Thread: FormField (XP)

  1. #1
    New Lounger
    Join Date
    Jun 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FormField (XP)

    Have a textbox in a UserForm where the user shall fill in a date, ex 20030710. The value shall be displayed in a FormField in a letter. I have tried to format the FormField as "Digits", #### - ## - ##, but I only get the 7 first characters. If I fill in the FormField "directly" in the letter, it works, but not when I get the result from the textbox. Should I try and format the textbox instead, and how do I do that? Looping.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: FormField (XP)

    I would format the form field as a Date, yyyy-MM-dd. If that is your default Windows date format, use code like the following in your user form:

    ActiveDocument.FormFields("Text1").Result = Left(Me.TextBox1, 4) & "- " & Mid(Me.TextBox1, 5, 2) & "-" & Right(Me.TextBox1, 2)

  3. #3
    New Lounger
    Join Date
    Jun 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FormField (XP)

    Thank's. I will try that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •