Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8304775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:56:02+00:00 2026-06-08T17:56:02+00:00

Im am using Word VBA to create a form field and then insert a

  • 0

Im am using Word VBA to create a form field and then insert a value into that field.

Problem is I need to change the data type of the field I have created.

Code:

  ActiveDocument.Bookmarks("Loan_Amount").Select
  ActiveDocument.FormFields.Add FFHere, wdFieldFormTextInput
  ActiveDocument.FormFields("Text1").Result = Value

Had a hunt around but can’t find anything on the topic. It would also be nice to change the name of the bookmark of the field (calls itself “Text1” by default).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:56:03+00:00Added an answer on June 8, 2026 at 5:56 pm

    It would also be nice to change the name of the bookmark of the field (calls itself “Text1” by default).

    Like this?

    Sub Sample()
        Dim ff As FormField
    
        ActiveDocument.Bookmarks("Loan_Amount").Select
    
        Set ff = ActiveDocument.FormFields.Add(FFHere, wdFieldFormTextInput)
        ff.Name = "BlahBlah"
    End Sub
    

    And here is an example which inserts a Text field but changes it to Date Field

    Sub Sample()
        Dim ff As FormField
        Set ff = ActiveDocument.FormFields.Add(FFHere, wdFieldFormTextInput)
        ff.Select
        With Selection.FormFields(1)
            '~~> Change Name Here
            .Name = "BlahBlah"
            '~~> Change Type here
            With .TextInput
                .EditType Type:=wdCurrentDateText, Default:="", Format:=""
                .Width = 0
            End With
        End With
    End Sub
    

    Other type that you can change it to are

    1. wdCurrentDateText
    2. wdCalculationText
    3. wdCurrentTimeText
    4. wdDateText
    5. wdNumberText (This is what your question requested for)

    NOTE: I am assuming that FFHere is a valid range

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I basically want to open a browser window from Word using VBA that does
I want to remove all vba-modules from an MS Word template using VBScript. I
Using VBA I want to send a copy of the current word document to
I'm creating a word document programatically using VBA. 1) I have a a string
I'm trying to write a VBA macro in Word that will extract shapes and
I have a Word document with two embedded Excel files (added using Insert ->
Using VBA in MS Project 2003 and working with a Word Document I try
In general, Using VBA, how do I determine where the Current users Application Data
How do you subsribe to control's events in VBA? I am using MS Word
I experience a strange problem in MS Word 2010 VBA. I added a ribbon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.