Get bookmark index using system.Information()Create bookmark via selected text?Get All Bookmarks from Word DocumentRewriting Bookmarks in Word Using VB.NETReplace Text in Bookmark in Word without Deleting BookmarkHow to delete a line above a bookmark in Word using vbaGet Word bookmark index to replace image inside bookmark from ExcelInsert text before bookmarkWord VBA - Returning the bookmark by finding TextGet text at the bookmarkVBA and Word: Cutting a TextBox name to match that of a Bookmark

What systems of robust steganography are out there?

What is this old "lemon-squeezer" shaped pan

Ethical for a company to ask employees to move furniture on the weekend?

Index Uniqueness Overhead

Extension of trace on von Neumann subalgebra

If a player tries to persuade somebody, what should that creature roll not to be persuaded?

I have accepted an internship offer. Should I inform companies I have applied to that have not gotten back to me yet?

Confusion about a proof of a limit formula

What made Windows ME so crash-prone?

Are the errors in this formulation of the simple linear regression model random variables?

Do aircraft cabins have suspension?

If I stood next to a piece of metal heated to a million degrees, but in a perfect vacuum, would I feel hot?

Why does FFmpeg choose 10+20+20 ms instead of an even 16 ms for 60 fps GIF images?

Remove cardinal direction letters

Did 007 exist before James Bond?

In Adventurers League, is there any way for an 5th-level wizard to gain heavy armor proficiency?

Was Willow's first magic display (blazing arrow through arm) actual magic, and if not, what's the trick?

Using two linked programs, output ordinal numbers up to n

Credit card stolen every 1-2 years. What am I doing wrong?

Will it hurt my career to work as a graphic designer in a startup for beauty and skin care?

What impact would a dragon the size of Asia have on the environment?

Draw a line nicely around notes

Cauchy reals and Dedekind reals satisfy "the same mathematical theorems"

What does it mean to fail a saving throw by 5 or more?



Get bookmark index using system.Information()


Create bookmark via selected text?Get All Bookmarks from Word DocumentRewriting Bookmarks in Word Using VB.NETReplace Text in Bookmark in Word without Deleting BookmarkHow to delete a line above a bookmark in Word using vbaGet Word bookmark index to replace image inside bookmark from ExcelInsert text before bookmarkWord VBA - Returning the bookmark by finding TextGet text at the bookmarkVBA and Word: Cutting a TextBox name to match that of a Bookmark






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm using below line to get a selected drop down from an endoresment.



ActiveDocument.FormFields(ActiveDocument.Range.Bookmarks(Selection.Information(30)).Name).Dropdown.Value


But I'm unable to get the correct bookmark index through Selection.Information(30) hence getting incorrect bookmark name.



Can any one please help me here.










share|improve this question
























  • Selection.information (30) gives the current bookmark index with that index I can get the bookmark name but unfortunatly i am not getting the current book mark index. Is there any way to get current bookmark index?

    – bandarubharath7777 bharath
    Mar 26 at 10:31












  • I was on a mobile device that last few days so couldn't research this in detail. I hope the information in the Answer helps...

    – Cindy Meister
    Mar 28 at 14:33











  • Hi cindy,,,It works but, I am using like Activedocument.formfields(selection.bookmarks(1).name).enable = False but after that statement we are unprotecting the activedocument then the disabled bookmark again becoming enable after unprotecting. Can you help me here

    – bandarubharath7777 bharath
    Apr 4 at 7:36












  • What works? The code I proposed in the Answer? If yes, please mark that as the "Answer" since the original question has been taken care of. Start a new question for a new topic, with full information on how to reproduce the behavior, including the type of protection involved. Stack Overflow is not a "forum" where an endless discussion is possible - it's a Question & Answer format.

    – Cindy Meister
    Apr 4 at 11:21

















1















I'm using below line to get a selected drop down from an endoresment.



ActiveDocument.FormFields(ActiveDocument.Range.Bookmarks(Selection.Information(30)).Name).Dropdown.Value


But I'm unable to get the correct bookmark index through Selection.Information(30) hence getting incorrect bookmark name.



Can any one please help me here.










share|improve this question
























  • Selection.information (30) gives the current bookmark index with that index I can get the bookmark name but unfortunatly i am not getting the current book mark index. Is there any way to get current bookmark index?

    – bandarubharath7777 bharath
    Mar 26 at 10:31












  • I was on a mobile device that last few days so couldn't research this in detail. I hope the information in the Answer helps...

    – Cindy Meister
    Mar 28 at 14:33











  • Hi cindy,,,It works but, I am using like Activedocument.formfields(selection.bookmarks(1).name).enable = False but after that statement we are unprotecting the activedocument then the disabled bookmark again becoming enable after unprotecting. Can you help me here

    – bandarubharath7777 bharath
    Apr 4 at 7:36












  • What works? The code I proposed in the Answer? If yes, please mark that as the "Answer" since the original question has been taken care of. Start a new question for a new topic, with full information on how to reproduce the behavior, including the type of protection involved. Stack Overflow is not a "forum" where an endless discussion is possible - it's a Question & Answer format.

    – Cindy Meister
    Apr 4 at 11:21













1












1








1








I'm using below line to get a selected drop down from an endoresment.



ActiveDocument.FormFields(ActiveDocument.Range.Bookmarks(Selection.Information(30)).Name).Dropdown.Value


But I'm unable to get the correct bookmark index through Selection.Information(30) hence getting incorrect bookmark name.



Can any one please help me here.










share|improve this question
















I'm using below line to get a selected drop down from an endoresment.



ActiveDocument.FormFields(ActiveDocument.Range.Bookmarks(Selection.Information(30)).Name).Dropdown.Value


But I'm unable to get the correct bookmark index through Selection.Information(30) hence getting incorrect bookmark name.



Can any one please help me here.







vba ms-word






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 14:33









Cindy Meister

17.3k10 gold badges25 silver badges38 bronze badges




17.3k10 gold badges25 silver badges38 bronze badges










asked Mar 26 at 7:31









bandarubharath7777 bharathbandarubharath7777 bharath

63 bronze badges




63 bronze badges












  • Selection.information (30) gives the current bookmark index with that index I can get the bookmark name but unfortunatly i am not getting the current book mark index. Is there any way to get current bookmark index?

    – bandarubharath7777 bharath
    Mar 26 at 10:31












  • I was on a mobile device that last few days so couldn't research this in detail. I hope the information in the Answer helps...

    – Cindy Meister
    Mar 28 at 14:33











  • Hi cindy,,,It works but, I am using like Activedocument.formfields(selection.bookmarks(1).name).enable = False but after that statement we are unprotecting the activedocument then the disabled bookmark again becoming enable after unprotecting. Can you help me here

    – bandarubharath7777 bharath
    Apr 4 at 7:36












  • What works? The code I proposed in the Answer? If yes, please mark that as the "Answer" since the original question has been taken care of. Start a new question for a new topic, with full information on how to reproduce the behavior, including the type of protection involved. Stack Overflow is not a "forum" where an endless discussion is possible - it's a Question & Answer format.

    – Cindy Meister
    Apr 4 at 11:21

















  • Selection.information (30) gives the current bookmark index with that index I can get the bookmark name but unfortunatly i am not getting the current book mark index. Is there any way to get current bookmark index?

    – bandarubharath7777 bharath
    Mar 26 at 10:31












  • I was on a mobile device that last few days so couldn't research this in detail. I hope the information in the Answer helps...

    – Cindy Meister
    Mar 28 at 14:33











  • Hi cindy,,,It works but, I am using like Activedocument.formfields(selection.bookmarks(1).name).enable = False but after that statement we are unprotecting the activedocument then the disabled bookmark again becoming enable after unprotecting. Can you help me here

    – bandarubharath7777 bharath
    Apr 4 at 7:36












  • What works? The code I proposed in the Answer? If yes, please mark that as the "Answer" since the original question has been taken care of. Start a new question for a new topic, with full information on how to reproduce the behavior, including the type of protection involved. Stack Overflow is not a "forum" where an endless discussion is possible - it's a Question & Answer format.

    – Cindy Meister
    Apr 4 at 11:21
















Selection.information (30) gives the current bookmark index with that index I can get the bookmark name but unfortunatly i am not getting the current book mark index. Is there any way to get current bookmark index?

– bandarubharath7777 bharath
Mar 26 at 10:31






Selection.information (30) gives the current bookmark index with that index I can get the bookmark name but unfortunatly i am not getting the current book mark index. Is there any way to get current bookmark index?

– bandarubharath7777 bharath
Mar 26 at 10:31














I was on a mobile device that last few days so couldn't research this in detail. I hope the information in the Answer helps...

– Cindy Meister
Mar 28 at 14:33





I was on a mobile device that last few days so couldn't research this in detail. I hope the information in the Answer helps...

– Cindy Meister
Mar 28 at 14:33













Hi cindy,,,It works but, I am using like Activedocument.formfields(selection.bookmarks(1).name).enable = False but after that statement we are unprotecting the activedocument then the disabled bookmark again becoming enable after unprotecting. Can you help me here

– bandarubharath7777 bharath
Apr 4 at 7:36






Hi cindy,,,It works but, I am using like Activedocument.formfields(selection.bookmarks(1).name).enable = False but after that statement we are unprotecting the activedocument then the disabled bookmark again becoming enable after unprotecting. Can you help me here

– bandarubharath7777 bharath
Apr 4 at 7:36














What works? The code I proposed in the Answer? If yes, please mark that as the "Answer" since the original question has been taken care of. Start a new question for a new topic, with full information on how to reproduce the behavior, including the type of protection involved. Stack Overflow is not a "forum" where an endless discussion is possible - it's a Question & Answer format.

– Cindy Meister
Apr 4 at 11:21





What works? The code I proposed in the Answer? If yes, please mark that as the "Answer" since the original question has been taken care of. Start a new question for a new topic, with full information on how to reproduce the behavior, including the type of protection involved. Stack Overflow is not a "forum" where an endless discussion is possible - it's a Question & Answer format.

– Cindy Meister
Apr 4 at 11:21












1 Answer
1






active

oldest

votes


















0














The more "conventional" way to get the name of the currently active/selected bookmark name is:



Selection.Bookmarks(1).Name


Since this appears to be a form field, it's also possible to get the name via that collection:



Selection.Range.FormFields(1).Name


In a comment the request is for the bookmark index, although the request in the Question is for the bookmark name... In any case, to get the bookmark index get the count of all bookmarks from the start of the document to the end of the selection. (Note that this gets the index of the last previous bookmark, which is not necessary in the selection):



bkmIndex = ActiveDocument.Range(0, Selection.Range.End).Bookmarks.Count
Debug.Print ActiveDocument.Bookmarks(bkmIndex).Name


Please note that Information(30) is an old Word Basic value (I had to look it up in 1995 literature) that has no official equivalent in the VBA object model. It still works for reasons of backwards compatibility, but in such cases there are no guarantees that it will continue to work.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    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%2fstackoverflow.com%2fquestions%2f55351842%2fget-bookmark-index-using-system-information%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The more "conventional" way to get the name of the currently active/selected bookmark name is:



    Selection.Bookmarks(1).Name


    Since this appears to be a form field, it's also possible to get the name via that collection:



    Selection.Range.FormFields(1).Name


    In a comment the request is for the bookmark index, although the request in the Question is for the bookmark name... In any case, to get the bookmark index get the count of all bookmarks from the start of the document to the end of the selection. (Note that this gets the index of the last previous bookmark, which is not necessary in the selection):



    bkmIndex = ActiveDocument.Range(0, Selection.Range.End).Bookmarks.Count
    Debug.Print ActiveDocument.Bookmarks(bkmIndex).Name


    Please note that Information(30) is an old Word Basic value (I had to look it up in 1995 literature) that has no official equivalent in the VBA object model. It still works for reasons of backwards compatibility, but in such cases there are no guarantees that it will continue to work.






    share|improve this answer





























      0














      The more "conventional" way to get the name of the currently active/selected bookmark name is:



      Selection.Bookmarks(1).Name


      Since this appears to be a form field, it's also possible to get the name via that collection:



      Selection.Range.FormFields(1).Name


      In a comment the request is for the bookmark index, although the request in the Question is for the bookmark name... In any case, to get the bookmark index get the count of all bookmarks from the start of the document to the end of the selection. (Note that this gets the index of the last previous bookmark, which is not necessary in the selection):



      bkmIndex = ActiveDocument.Range(0, Selection.Range.End).Bookmarks.Count
      Debug.Print ActiveDocument.Bookmarks(bkmIndex).Name


      Please note that Information(30) is an old Word Basic value (I had to look it up in 1995 literature) that has no official equivalent in the VBA object model. It still works for reasons of backwards compatibility, but in such cases there are no guarantees that it will continue to work.






      share|improve this answer



























        0












        0








        0







        The more "conventional" way to get the name of the currently active/selected bookmark name is:



        Selection.Bookmarks(1).Name


        Since this appears to be a form field, it's also possible to get the name via that collection:



        Selection.Range.FormFields(1).Name


        In a comment the request is for the bookmark index, although the request in the Question is for the bookmark name... In any case, to get the bookmark index get the count of all bookmarks from the start of the document to the end of the selection. (Note that this gets the index of the last previous bookmark, which is not necessary in the selection):



        bkmIndex = ActiveDocument.Range(0, Selection.Range.End).Bookmarks.Count
        Debug.Print ActiveDocument.Bookmarks(bkmIndex).Name


        Please note that Information(30) is an old Word Basic value (I had to look it up in 1995 literature) that has no official equivalent in the VBA object model. It still works for reasons of backwards compatibility, but in such cases there are no guarantees that it will continue to work.






        share|improve this answer















        The more "conventional" way to get the name of the currently active/selected bookmark name is:



        Selection.Bookmarks(1).Name


        Since this appears to be a form field, it's also possible to get the name via that collection:



        Selection.Range.FormFields(1).Name


        In a comment the request is for the bookmark index, although the request in the Question is for the bookmark name... In any case, to get the bookmark index get the count of all bookmarks from the start of the document to the end of the selection. (Note that this gets the index of the last previous bookmark, which is not necessary in the selection):



        bkmIndex = ActiveDocument.Range(0, Selection.Range.End).Bookmarks.Count
        Debug.Print ActiveDocument.Bookmarks(bkmIndex).Name


        Please note that Information(30) is an old Word Basic value (I had to look it up in 1995 literature) that has no official equivalent in the VBA object model. It still works for reasons of backwards compatibility, but in such cases there are no guarantees that it will continue to work.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 28 at 14:32

























        answered Mar 28 at 14:27









        Cindy MeisterCindy Meister

        17.3k10 gold badges25 silver badges38 bronze badges




        17.3k10 gold badges25 silver badges38 bronze badges


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • 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%2fstackoverflow.com%2fquestions%2f55351842%2fget-bookmark-index-using-system-information%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

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현