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

  • SEARCH
  • Home
  • 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 8570323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:31:56+00:00 2026-06-11T18:31:56+00:00

I have a word document with a number of fields scattered around the text.

  • 0

I have a word document with a number of fields scattered around the text. The fields were created using insert > quick parts > field. Each field has a unique name.

I managed to open the document but I don’t know how to reference a particular field so that I can put in my value.

I managed to iterate through the fields in the document using:

Dim flds As Word.Fields
Dim fld As Word.Field

flds = wrdDoc.Fields
For Each fld In flds
...
next

But the “fld” variable does not seem to have a “name” property and therefore I don’t know how to reference a specific field.

I was hoping that there was something like:

flds("MyField1") = "blablabla"

But I can only put indexes (integers) in the brackets.

Any ideas about how I can go about reaching my goal?

Thanks

  • 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-11T18:31:57+00:00Added an answer on June 11, 2026 at 6:31 pm

    What kind of fields are they?
    I don’t know if this will fit in your case, but if the fields look like this when shown (with ALT-F9):

    {DOCVARIABLE fieldname}

    then use this:

    wordDocument.Variables("fieldname").Value = "abc"
    wordDocument.Fields.Update
    

    This will work only on DOCVARIABLE-Fields. (Note in this case that the string passed to .Value may not be empty.)

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

Sidebar

Related Questions

I have to count the number of unique words from a text document using
I am using c# to develop the function, I have a word document who
I have a GridView and I want to export it in Word document using
I am using Access to send text to Word via bookmarks. I have bookmarks
I have MS Word document which contains around 50 images with caption. My problem
I have a word document with a number of sections that I'm to fix
I have extracted a number of OleObject files from a Word DOCX document (oleObject1.bin
I have a word document with a bookmark. I use the bookmark to get
I have a word document that was saved as xml. now I need to
I have an ordered list in my Word document, and I want to add

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.