![]() You are allowed only two spots, the default which is a separate file on your computer and the currently active document. (The Customize the Ribbon dialog has no such option.) The place to do this is in the Modify the Quick Access Toolbar dialog. You can put a QAT (Quick Access Toolbar) button in your document or template A macrobutton field in the document does not carry a macro stored elsewhere with it. The macro you are activating should be in the document with the button or its attached template for it to be portable. Or, perhaps, a Content Control with an on exit macro that does things with the content. Start using instead a QAT button, perhaps that calls up a UserForm. You cannot select text in the document and then click on a macrobutton field in the document. ![]() ![]() ![]() Sub PROC()īy it's nature, clicking on a MacroButton field selects the field any action you take to add text will replace it. I've tried to create a MacroButton to run this macro, but the problem is that, after selecting the text, I want to search, when I try to double click the MacroButton, the selection disappears, resulting in a serch for an empty value.Ĭan anyone help me create a more practical VBA macro that I can associate with a macro button, so that it will work on every computer that opens this document? The ideal scenario was that the macro would search for the text inserted on a given line of the document (I suggest the first line, where users would insert the name they want to search) without the need of selecting the text to be searched. For it to work on their computers, I would have to install a similar shortcut on each one, which is not practical. The problem is that I want to share this document with my colleagues. With this macro, what I'm doing is writing the name of the county I want to search, then selecting that name with the mouse, and running the macro using the shortcut I've put in the Quick Access menu. I need to quickly find the text under each of these titles (it is a document that lists the names of the local counties in each district, the titles being the name of each district). This is very useful because I'm working on a document with more than 500 titles. After consulting some of the conversations in this forum, I have managed to create a VBA code in MS Word that allows me to search for a selected word among all the titles in my document that have the same formatting.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |