none
How make MyVarEditTime = edit time of Word doc so can use in userForm in word 2013? Also use in formula(S) in user form. RRS feed

  • Question

  • I have user forms in a word template ( dotm file ) used to create an docm file.

    UserFromStats  has Only Stats I want, in format I need.

    I have code to convert  total edit time in minutes to X hrs. and Y minutes.    in a font size I can see.  Still unable to find way to make txt in a Microsoft created dialog box bigger, NOT everything, every where bigger, just txt in dialog box.

    stuck at getting a variable to hold the value of "edit time" of activeDocument.

    I can run a Microsoft built in Dialog to get a form showing total minutes and other info.

    I can use insert field in activeDocument to get value of "edit time" using QuickParts".

    But NOT make MyVarEditTime = edit time of document.    I can do both with "NumChars" "NumPages".

    could not find where, or what "edit time" is part of.  did not find as part of "document" , "active document" and so on.

    did see in code

    Creating quick parts with VBA

    Microsoft Office for Developers

     > 

    Word for Developers

    The Add method of the BuildingBlockEntries class creates a new building block entry in a template and returns a BuildingBlock object that represents the new building block entry.

    Sub AddBBProgramatically()

    Dim oRng As Word.Range

    Dim oTmp As Template

      Set oRng = Selection.Range

      Set oTmp = Document.AttachedTemplate

      oTmp.BuildingBlockEntries.Add _

        Name:="New BB", Type:=wdTypeQuickParts, Category:="New Category", _

        Range:=oRng, InsertOptions:=wdInsertContent

    lbl_Exit:

      Exit Sub

    End Sub

    making me wonder if I need to use some part of "BuildingBlock" to make MyVarEditTime = EditTime of document?


    Mark J

    Monday, June 22, 2015 12:06 PM

Answers

  • Hi Mark,

    >> Still unable to find way to make txt in a Microsoft created dialog box bigger, NOT everything, every where bigger, just txt in dialog box.

    Which dialog box?

    >> stuck at getting a variable to hold the value of "edit time" of activeDocument.

    We could get the total edit time through BuiltInDocumentProperties property.

    ActiveDocument.BuiltInDocumentProperties("Total editing time")

    For Quick Parts: Insert=>Quick Parts=>Field=>Date and Time category=>EditTime.

    >> But NOT make MyVarEditTime = edit time of document.    I can do both with "NumChars" "NumPages".

    How do you do with NumChars and NumPages?

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:02 PM
    Tuesday, June 23, 2015 6:44 AM
    Moderator
  • HI Mark

    I think Starain has provided you with the VBA puzzle piece you're looking for.

    To answer your question "Still unable to find way to make txt in a Microsoft created dialog box bigger, NOT everything, every where bigger, just txt in dialog box.": This is not possible. You cannot affect the display or contents of the built-in dialog boxes.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:01 PM
    Tuesday, June 23, 2015 3:24 PM
    Moderator
  • Thanks for answer about making txt size larger in a dialog box.  

    Was not answer I wanted.

    But I am very happy to know the reason I could not find code to affect the txt in a dialog box was because not possible, instead of I was not looking in right places.

    BUT

    Does that mean when I use the VBA or VB Function MsgBox  I am ALSO unable to affect the SIZE or FONT  of "Prompt" or "Title" in that MsgBox? 

    Even if the VBA Function MsgBox is listed as a Function and not a dialog box?


    Mark J


    Sunday, June 28, 2015 5:38 AM
  • Hi Mark

    Starain gave you the code to get the editing time. The property name is in the parentheses.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:02 PM
    Sunday, June 28, 2015 3:22 PM
    Moderator
  • Hi Mark

    <<Does that mean when I use the VBA or VB Function MsgBox  I am ALSO unable to affect the SIZE or FONT  of "Prompt" or "Title" in that MsgBox? >>

    That is correct.

    However, you can create a UserForm (VBA custom dialog box). There you can set the font name and size you want to use.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:01 PM
    Sunday, June 28, 2015 3:22 PM
    Moderator
  • want to say thanks again.  for answer.

    do have a question about answer though.

    where can I find listing of the syntax for

    Getting values of the  BuiltInDocumentProperties property.

    below gets what I wanted this time. 

    ActiveDocument.BuiltInDocumentProperties("Total editing time")

    I see I have to enter a string to get value I want.  (I used similar method to set certain options on Access databases.)

    BUT I couldn't find where listing of these strings like "Total editing time" were stored.

    didn't find at         BuiltInDocumentProperties

    or in objectBrowser of word 2013

    thanks.


    Mark J

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:18 PM
    Wednesday, July 8, 2015 3:59 AM
  • Hi Mark,

    For additional issue/question that not directly related to the original issue, it would be better if you open up a new thread for the new question. In this way, our discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:18 PM
    Wednesday, July 8, 2015 5:45 AM
    Moderator

All replies

  • Hi Mark,

    >> Still unable to find way to make txt in a Microsoft created dialog box bigger, NOT everything, every where bigger, just txt in dialog box.

    Which dialog box?

    >> stuck at getting a variable to hold the value of "edit time" of activeDocument.

    We could get the total edit time through BuiltInDocumentProperties property.

    ActiveDocument.BuiltInDocumentProperties("Total editing time")

    For Quick Parts: Insert=>Quick Parts=>Field=>Date and Time category=>EditTime.

    >> But NOT make MyVarEditTime = edit time of document.    I can do both with "NumChars" "NumPages".

    How do you do with NumChars and NumPages?

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:02 PM
    Tuesday, June 23, 2015 6:44 AM
    Moderator
  • HI Mark

    I think Starain has provided you with the VBA puzzle piece you're looking for.

    To answer your question "Still unable to find way to make txt in a Microsoft created dialog box bigger, NOT everything, every where bigger, just txt in dialog box.": This is not possible. You cannot affect the display or contents of the built-in dialog boxes.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:01 PM
    Tuesday, June 23, 2015 3:24 PM
    Moderator
  • Thanks for answer about making txt size larger in a dialog box.  

    Was not answer I wanted.

    But I am very happy to know the reason I could not find code to affect the txt in a dialog box was because not possible, instead of I was not looking in right places.

    BUT

    Does that mean when I use the VBA or VB Function MsgBox  I am ALSO unable to affect the SIZE or FONT  of "Prompt" or "Title" in that MsgBox? 

    Even if the VBA Function MsgBox is listed as a Function and not a dialog box?


    Mark J


    Sunday, June 28, 2015 5:38 AM
  • Thanks, with that info and the link I was able to get the value of Edit Time for my math.

    And was able to run both sample bits of code at that link

    BuiltInDocumentProperties.

    BUT still unable to figure out how to get to point to see syntax for editing time. 

    The shown link had lots of properties BUT not one for editTime.

    I seem to missing something I needed to be able to find the info you gave me. 

    I couldn't find, "editTime" in object browser, or at link "BuiltInDocumentProperties".


    Mark J

    Sunday, June 28, 2015 7:50 AM
  • Hi Mark

    Starain gave you the code to get the editing time. The property name is in the parentheses.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:02 PM
    Sunday, June 28, 2015 3:22 PM
    Moderator
  • Hi Mark

    <<Does that mean when I use the VBA or VB Function MsgBox  I am ALSO unable to affect the SIZE or FONT  of "Prompt" or "Title" in that MsgBox? >>

    That is correct.

    However, you can create a UserForm (VBA custom dialog box). There you can set the font name and size you want to use.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:01 PM
    Sunday, June 28, 2015 3:22 PM
    Moderator
  • want to say thanks again.  for answer.

    do have a question about answer though.

    where can I find listing of the syntax for

    Getting values of the  BuiltInDocumentProperties property.

    below gets what I wanted this time. 

    ActiveDocument.BuiltInDocumentProperties("Total editing time")

    I see I have to enter a string to get value I want.  (I used similar method to set certain options on Access databases.)

    BUT I couldn't find where listing of these strings like "Total editing time" were stored.

    didn't find at         BuiltInDocumentProperties

    or in objectBrowser of word 2013

    thanks.


    Mark J

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:18 PM
    Wednesday, July 8, 2015 3:59 AM
  • Hi Mark,

    For additional issue/question that not directly related to the original issue, it would be better if you open up a new thread for the new question. In this way, our discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by PuzzledByWord Wednesday, July 8, 2015 12:18 PM
    Wednesday, July 8, 2015 5:45 AM
    Moderator
  • EDIT OF  JULY 8 2015 POST.    

    ALL CAPS TO "ONLY" SET APART OF ORGINAL POST. 

    IF BETTER WAY PLEASE LET ME KNOW.

    REPEAT OF QUESTION, PHRASED DIFFERENTLY.

    I DO NOT WANT ALL DOCUMENT BUILTIN PROPERTIES, JUST A VERY FEW PROPERTIES.

    CODE USEING  

    "Total edit time"  

    gets value I need.

    BUT HOW DO I TELL I SHOULD USE     

    "Total edit time"   and NOT   "edittime" or "EditTime" or "edit time"  

    I HAVE GOTTEN VERY HELPFUL LINKS TO CODE THAT WOULD ADD TO DOCUMENT A LIST OF

    "ALL DOCUMENT PROPERTIES" WITH VALUES OR NOT.

    AND OTHER CODE THAT WOULD  ONLY  ADD TO DOCUMENT   LIST OF PROPERITES THAT HAVE AN VALUE.

    Sorry.

    For me PROBLEM was being UNABLE to find documentation how to access the values of the  BuiltInDocumentProperties property. In the first place.  After finding out "editTime" was a Built In Doc Prop.

    ActiveDocument.BuiltInDocumentProperties("Total editing time")

    I STILL cannot find where listing of these strings like "Total editing time" were stored or listed.

    didn't find under 

    ActiveDocument

    BuiltInDocumentProperties

    in objectBrowser of word 2013 or Microsoft Reference sites, THAT showed other properties.

    Thanks.

    p.s. think I got all marked as got answer.  and am making this a new question.


    Mark J


    • Edited by PuzzledByWord Sunday, July 12, 2015 4:03 AM I was not clear, wanted to learn syntax to get a value, not all values.
    Wednesday, July 8, 2015 12:18 PM