MS Word: Using Formulas with Custom Doc PropertiesAssembling Word Doc using Data from Excel- MS Office 2010MS...

Why is working on the same position for more than 15 years not a red flag?

Groups acting on trees

A minimum of two personnel "are" or "is"?

What does Cypher mean when he says Neo is "gonna pop"?

How would one buy a used TIE Fighter or X-Wing?

insert EOF statement before the last line of file

Using only 1s, make 29 with the minimum number of digits

Avoiding morning and evening handshakes

Is there some relative to Dutch word "kijken" in German?

The effects of magnetism in radio transmissions

How can animals be objects of ethics without being subjects as well?

Jumping Numbers

Placing an adverb between a verb and an object?

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

Help Me simplify: C*(A+B) + ~A*B

How should I handle players who ignore the session zero agreement?

Slow moving projectiles from a hand-held weapon - how do they reach the target?

Dilemma of explaining to interviewer that he is the reason for declining second interview

Pre-1980's science fiction short story: alien disguised as a woman shot by a gangster, has tentacles coming out of her breasts when remaking her body

Why Smart Plugs don't require setting port forwarding on router and how to accomplish this with NodeMCU (ESP8266)

Can you earn endless XP using a Flameskull and its self-revival feature?

Broken patches on a road

How to deal with an incendiary email that was recalled

Where are a monster’s hit dice found in the stat block?



MS Word: Using Formulas with Custom Doc Properties


Assembling Word Doc using Data from Excel- MS Office 2010MS Word 2010 - Change Displayed Doc Properties in File>InfoCounting pages within Word [.doc] documentsDOCX to PDF… with Custom Document Propertieslink word doc to content control in another word docKeep heading type with number when adding a cross reference in Word 2011Word Index not in 100% alphabetical orderHow to build custom text that will have: (a) generic template creation, (b) usability across multiple documents, AND (c) automate updateWord crashing with formulasPuzzle - cross platform Word Doc, tick box character translation issue - possible legal implications for users













0















Anyone know how to add 1 to a custom document property? For some reason this really simple equation escapes me. I have a custom property, Document_Number, saved as a Number format. When revealing field codes, I've tried these lines:



{ = { DOCPROPERTY "Document_Number"  * MERGEFORMAT } + 1 }
{ = { DOCPROPERTY "Document_Number" * MERGEFORMAT + 1} }
{ = { DOCPROPERTY "Document_Number" +1 * MERGEFORMAT } }


Books don't seem to cover this. Google doesn't seem to cover this. What am I doing wrong? I just want to add 1 to the document property. This can't be that hard to put together a formula, right?










share|improve this question















migrated from stackoverflow.com Aug 5 '16 at 16:37


This question came from our site for professional and enthusiast programmers.



















  • Assumed I could do math calculations on user-defined properties if it was a numeric type. Does anyone know a property I can use to show the number of a document in a series of documents that I can add 1 to?

    – Steve G.
    Aug 11 '16 at 19:36













  • If you’re trying to change the document property, the answer that says “You can’t” is right. But if you’re just trying to display the result of a computation involving a document property as a term — your first option ({ = { DOCPROPERTY "Document_Number" * MERGEFORMAT } +1 }) worked for me (in Word 2013).

    – Scott
    Jul 24 '18 at 4:08
















0















Anyone know how to add 1 to a custom document property? For some reason this really simple equation escapes me. I have a custom property, Document_Number, saved as a Number format. When revealing field codes, I've tried these lines:



{ = { DOCPROPERTY "Document_Number"  * MERGEFORMAT } + 1 }
{ = { DOCPROPERTY "Document_Number" * MERGEFORMAT + 1} }
{ = { DOCPROPERTY "Document_Number" +1 * MERGEFORMAT } }


Books don't seem to cover this. Google doesn't seem to cover this. What am I doing wrong? I just want to add 1 to the document property. This can't be that hard to put together a formula, right?










share|improve this question















migrated from stackoverflow.com Aug 5 '16 at 16:37


This question came from our site for professional and enthusiast programmers.



















  • Assumed I could do math calculations on user-defined properties if it was a numeric type. Does anyone know a property I can use to show the number of a document in a series of documents that I can add 1 to?

    – Steve G.
    Aug 11 '16 at 19:36













  • If you’re trying to change the document property, the answer that says “You can’t” is right. But if you’re just trying to display the result of a computation involving a document property as a term — your first option ({ = { DOCPROPERTY "Document_Number" * MERGEFORMAT } +1 }) worked for me (in Word 2013).

    – Scott
    Jul 24 '18 at 4:08














0












0








0








Anyone know how to add 1 to a custom document property? For some reason this really simple equation escapes me. I have a custom property, Document_Number, saved as a Number format. When revealing field codes, I've tried these lines:



{ = { DOCPROPERTY "Document_Number"  * MERGEFORMAT } + 1 }
{ = { DOCPROPERTY "Document_Number" * MERGEFORMAT + 1} }
{ = { DOCPROPERTY "Document_Number" +1 * MERGEFORMAT } }


Books don't seem to cover this. Google doesn't seem to cover this. What am I doing wrong? I just want to add 1 to the document property. This can't be that hard to put together a formula, right?










share|improve this question
















Anyone know how to add 1 to a custom document property? For some reason this really simple equation escapes me. I have a custom property, Document_Number, saved as a Number format. When revealing field codes, I've tried these lines:



{ = { DOCPROPERTY "Document_Number"  * MERGEFORMAT } + 1 }
{ = { DOCPROPERTY "Document_Number" * MERGEFORMAT + 1} }
{ = { DOCPROPERTY "Document_Number" +1 * MERGEFORMAT } }


Books don't seem to cover this. Google doesn't seem to cover this. What am I doing wrong? I just want to add 1 to the document property. This can't be that hard to put together a formula, right?







microsoft-word vba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 6 '16 at 7:04









dbmitch

1348




1348










asked Aug 4 '16 at 23:58









Steve G.Steve G.

65




65




migrated from stackoverflow.com Aug 5 '16 at 16:37


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Aug 5 '16 at 16:37


This question came from our site for professional and enthusiast programmers.















  • Assumed I could do math calculations on user-defined properties if it was a numeric type. Does anyone know a property I can use to show the number of a document in a series of documents that I can add 1 to?

    – Steve G.
    Aug 11 '16 at 19:36













  • If you’re trying to change the document property, the answer that says “You can’t” is right. But if you’re just trying to display the result of a computation involving a document property as a term — your first option ({ = { DOCPROPERTY "Document_Number" * MERGEFORMAT } +1 }) worked for me (in Word 2013).

    – Scott
    Jul 24 '18 at 4:08



















  • Assumed I could do math calculations on user-defined properties if it was a numeric type. Does anyone know a property I can use to show the number of a document in a series of documents that I can add 1 to?

    – Steve G.
    Aug 11 '16 at 19:36













  • If you’re trying to change the document property, the answer that says “You can’t” is right. But if you’re just trying to display the result of a computation involving a document property as a term — your first option ({ = { DOCPROPERTY "Document_Number" * MERGEFORMAT } +1 }) worked for me (in Word 2013).

    – Scott
    Jul 24 '18 at 4:08

















Assumed I could do math calculations on user-defined properties if it was a numeric type. Does anyone know a property I can use to show the number of a document in a series of documents that I can add 1 to?

– Steve G.
Aug 11 '16 at 19:36







Assumed I could do math calculations on user-defined properties if it was a numeric type. Does anyone know a property I can use to show the number of a document in a series of documents that I can add 1 to?

– Steve G.
Aug 11 '16 at 19:36















If you’re trying to change the document property, the answer that says “You can’t” is right. But if you’re just trying to display the result of a computation involving a document property as a term — your first option ({ = { DOCPROPERTY "Document_Number" * MERGEFORMAT } +1 }) worked for me (in Word 2013).

– Scott
Jul 24 '18 at 4:08





If you’re trying to change the document property, the answer that says “You can’t” is right. But if you’re just trying to display the result of a computation involving a document property as a term — your first option ({ = { DOCPROPERTY "Document_Number" * MERGEFORMAT } +1 }) worked for me (in Word 2013).

– Scott
Jul 24 '18 at 4:08










2 Answers
2






active

oldest

votes


















0














You can't update the value of a Custom Document Property using a field code.



In principle, it might look as if you could do it by making it a linked property, i.e. connected to the value of a bookmark, and update the content of the bookmark. But AFAICS it doesn't actually work.



You can update the value of the AUTHOR, TITLE, SUBJECT, KEYWORDS and COMMENTS builtin document properties using a field construction, e.g. for AUTHOR you could use:



{ AUTHOR { ={ AUTHOR }+1 } }


(If you literally mean that you can't take a Custom Document Property and display "1+its value", you have probably used the {} you can type on the keyboard for at least one of the brace pairs, instead of the special field code braces that you can insert using ctrl-F9 in Windows Word.)






share|improve this answer
























  • I typed in the above formula (subsituting AUTHOR for DOCPROPERTY "Document number") and I used Ctrl+F9 to insert the braces instead of typing them, but no dice. The document number displayed the current number, but no incrementation. But, like was discussed above, I guess you just can't perform math on custom properties, numeric or not. :/

    – Steve G.
    Aug 11 '16 at 23:01



















0














I got this to work
1) Insert field and add your custom doc property { DOCPROPERTY "Document_Number"}
2) Insert a second field as a formula field. Make it a simple one eg {=1+2}
3) toggle field codes for both fields
4) copy the first field, paste it over the "2" within the second field code
5) update fields
Voila



Check by editing your custom doc property from with in the properties menu and then do a blanket field update






share|improve this answer








New contributor




user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1110283%2fms-word-using-formulas-with-custom-doc-properties%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can't update the value of a Custom Document Property using a field code.



    In principle, it might look as if you could do it by making it a linked property, i.e. connected to the value of a bookmark, and update the content of the bookmark. But AFAICS it doesn't actually work.



    You can update the value of the AUTHOR, TITLE, SUBJECT, KEYWORDS and COMMENTS builtin document properties using a field construction, e.g. for AUTHOR you could use:



    { AUTHOR { ={ AUTHOR }+1 } }


    (If you literally mean that you can't take a Custom Document Property and display "1+its value", you have probably used the {} you can type on the keyboard for at least one of the brace pairs, instead of the special field code braces that you can insert using ctrl-F9 in Windows Word.)






    share|improve this answer
























    • I typed in the above formula (subsituting AUTHOR for DOCPROPERTY "Document number") and I used Ctrl+F9 to insert the braces instead of typing them, but no dice. The document number displayed the current number, but no incrementation. But, like was discussed above, I guess you just can't perform math on custom properties, numeric or not. :/

      – Steve G.
      Aug 11 '16 at 23:01
















    0














    You can't update the value of a Custom Document Property using a field code.



    In principle, it might look as if you could do it by making it a linked property, i.e. connected to the value of a bookmark, and update the content of the bookmark. But AFAICS it doesn't actually work.



    You can update the value of the AUTHOR, TITLE, SUBJECT, KEYWORDS and COMMENTS builtin document properties using a field construction, e.g. for AUTHOR you could use:



    { AUTHOR { ={ AUTHOR }+1 } }


    (If you literally mean that you can't take a Custom Document Property and display "1+its value", you have probably used the {} you can type on the keyboard for at least one of the brace pairs, instead of the special field code braces that you can insert using ctrl-F9 in Windows Word.)






    share|improve this answer
























    • I typed in the above formula (subsituting AUTHOR for DOCPROPERTY "Document number") and I used Ctrl+F9 to insert the braces instead of typing them, but no dice. The document number displayed the current number, but no incrementation. But, like was discussed above, I guess you just can't perform math on custom properties, numeric or not. :/

      – Steve G.
      Aug 11 '16 at 23:01














    0












    0








    0







    You can't update the value of a Custom Document Property using a field code.



    In principle, it might look as if you could do it by making it a linked property, i.e. connected to the value of a bookmark, and update the content of the bookmark. But AFAICS it doesn't actually work.



    You can update the value of the AUTHOR, TITLE, SUBJECT, KEYWORDS and COMMENTS builtin document properties using a field construction, e.g. for AUTHOR you could use:



    { AUTHOR { ={ AUTHOR }+1 } }


    (If you literally mean that you can't take a Custom Document Property and display "1+its value", you have probably used the {} you can type on the keyboard for at least one of the brace pairs, instead of the special field code braces that you can insert using ctrl-F9 in Windows Word.)






    share|improve this answer













    You can't update the value of a Custom Document Property using a field code.



    In principle, it might look as if you could do it by making it a linked property, i.e. connected to the value of a bookmark, and update the content of the bookmark. But AFAICS it doesn't actually work.



    You can update the value of the AUTHOR, TITLE, SUBJECT, KEYWORDS and COMMENTS builtin document properties using a field construction, e.g. for AUTHOR you could use:



    { AUTHOR { ={ AUTHOR }+1 } }


    (If you literally mean that you can't take a Custom Document Property and display "1+its value", you have probably used the {} you can type on the keyboard for at least one of the brace pairs, instead of the special field code braces that you can insert using ctrl-F9 in Windows Word.)







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 5 '16 at 10:25







    user181946




















    • I typed in the above formula (subsituting AUTHOR for DOCPROPERTY "Document number") and I used Ctrl+F9 to insert the braces instead of typing them, but no dice. The document number displayed the current number, but no incrementation. But, like was discussed above, I guess you just can't perform math on custom properties, numeric or not. :/

      – Steve G.
      Aug 11 '16 at 23:01



















    • I typed in the above formula (subsituting AUTHOR for DOCPROPERTY "Document number") and I used Ctrl+F9 to insert the braces instead of typing them, but no dice. The document number displayed the current number, but no incrementation. But, like was discussed above, I guess you just can't perform math on custom properties, numeric or not. :/

      – Steve G.
      Aug 11 '16 at 23:01

















    I typed in the above formula (subsituting AUTHOR for DOCPROPERTY "Document number") and I used Ctrl+F9 to insert the braces instead of typing them, but no dice. The document number displayed the current number, but no incrementation. But, like was discussed above, I guess you just can't perform math on custom properties, numeric or not. :/

    – Steve G.
    Aug 11 '16 at 23:01





    I typed in the above formula (subsituting AUTHOR for DOCPROPERTY "Document number") and I used Ctrl+F9 to insert the braces instead of typing them, but no dice. The document number displayed the current number, but no incrementation. But, like was discussed above, I guess you just can't perform math on custom properties, numeric or not. :/

    – Steve G.
    Aug 11 '16 at 23:01













    0














    I got this to work
    1) Insert field and add your custom doc property { DOCPROPERTY "Document_Number"}
    2) Insert a second field as a formula field. Make it a simple one eg {=1+2}
    3) toggle field codes for both fields
    4) copy the first field, paste it over the "2" within the second field code
    5) update fields
    Voila



    Check by editing your custom doc property from with in the properties menu and then do a blanket field update






    share|improve this answer








    New contributor




    user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      I got this to work
      1) Insert field and add your custom doc property { DOCPROPERTY "Document_Number"}
      2) Insert a second field as a formula field. Make it a simple one eg {=1+2}
      3) toggle field codes for both fields
      4) copy the first field, paste it over the "2" within the second field code
      5) update fields
      Voila



      Check by editing your custom doc property from with in the properties menu and then do a blanket field update






      share|improve this answer








      New contributor




      user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        I got this to work
        1) Insert field and add your custom doc property { DOCPROPERTY "Document_Number"}
        2) Insert a second field as a formula field. Make it a simple one eg {=1+2}
        3) toggle field codes for both fields
        4) copy the first field, paste it over the "2" within the second field code
        5) update fields
        Voila



        Check by editing your custom doc property from with in the properties menu and then do a blanket field update






        share|improve this answer








        New contributor




        user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        I got this to work
        1) Insert field and add your custom doc property { DOCPROPERTY "Document_Number"}
        2) Insert a second field as a formula field. Make it a simple one eg {=1+2}
        3) toggle field codes for both fields
        4) copy the first field, paste it over the "2" within the second field code
        5) update fields
        Voila



        Check by editing your custom doc property from with in the properties menu and then do a blanket field update







        share|improve this answer








        New contributor




        user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 17 mins ago









        user1003651user1003651

        1




        1




        New contributor




        user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        user1003651 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1110283%2fms-word-using-formulas-with-custom-doc-properties%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

            Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...