Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Feb 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MS Word DocProperty to table

    Hi everybody.

    I am trying to create a cover sheet for transmittal form for our project and I am stuck. We are retrieving data from another application in forms of DocProperties in MS Word. Then, we are printing the data into tables. However, forms have different number of entries resulting in different number of rows in tables. I have failed to come up with a solution which can take the data and put them into tables regardless of the number of rows.

    I am not sure if I could explain it clearly but I am desperate, please help

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    How are you populating the tables? A DOCPROPERTY field can be inserted into any cell to display the corresponding content there.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    New Lounger
    Join Date
    Feb 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by macropod View Post
    How are you populating the tables? A DOCPROPERTY field can be inserted into any cell to display the corresponding content there.
    I use Insert/Quick parts/Field. However, I found a topic and it says if I use {DOCPROPERTY Document_Row_<#>_Name} it would generate all the fields in the table row by row automatically. But it does not

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by Osman Elsöz View Post
    I found a topic and it says if I use {DOCPROPERTY Document_Row_<#>_Name} it would generate all the fields in the table row by row automatically.
    Well, that's not how a DOCPROPERTY field works. A DOCPROPERTY field can only output its own content - in this case, literally whatever text 'Document_Row_<#>_Name' contains.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Quote Originally Posted by Osman Elsöz View Post
    I use Insert/Quick parts/Field. However, I found a topic and it says if I use {DOCPROPERTY Document_Row_<#>_Name} it would generate all the fields in the table row by row automatically. But it does not
    I think this is from a page on generating a cover sheet template which is no longer available (and not archived).

    I believe it had code to generate custom document properties. Then that field would mean something.
    Charles Kyle Kenyon
    Madison, Wisconsin

  6. #6
    New Lounger
    Join Date
    Feb 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Charles Kenyon View Post
    I think this is from a page on generating a cover sheet template which is no longer available (and not archived).

    I believe it had code to generate custom document properties. Then that field would mean something.
    It is actually from a cover sheet template. Let me attach it to this post. Data is stored as custom document properties but I cannot have it written as table row by row.
    Attached Files Attached Files

  7. #7
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Yes, the document has a number of custom document properties. It does not, though, have the macros that would insert or use those properties. You are working with a part of a custom project. No one not familiar with that project is going to be able to help you. You may want to start over from scratch or simply type in the information you want.
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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