![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]() Quote:
I’m not sure if I’m using the code in the correct way 1. Do I need to save the doc file that contains the code (the one you have already sent) in a particular place on the hard disk to let it work (attached)? 2. What I did is that I wrote one of the expression listed on the “code file” and clicked to execute the code (attached)! But I got the security message 3. How can I give full permission and thus I never get that message? Best Jamal |
#2
|
||||
|
||||
![]()
Hi Jamal,
1. No. 2. Your second screenshot suggests you're trying to call the macro via a link that points to the 'ThisDocument' module in your 'Document1', not in the 'Acronym Manager'. Try activating the document you want to update, then press F11 and run the macro directly from the vbe. As you've noted, the code also provides a means of running it from a different document to the one your list is in. That means you could add it to Word's 'Normal' template and run the macro from there simply comment out the 'Set FRDoc = ThisDocument' line and un-comment the 'Set FRDoc = Documents.Open' line and update the file reference there to point to whever you want to keep your own list (just make sure that document doesn't have any macros). 3. Aside from adding the code to your 'Normal' template, you could keep the file in a 'trusted location'. See: http://office.microsoft.com/en-us/he...010031999.aspx
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]() Quote:
Scenario: 1. I got two files (screenshot is attached), the file that contains the list and the macro and another file in which I need to run the macro such that a. The expression is abbreviated the first time it appears on the document b. The expression in replaced by its abbreviation anywhere it appears on the document 2. Then how I’m supposed to run the macro that that it takes effect on the second file named “D3” a. Do I need to copy and paste the code to the file “D3” b. Do I need to copy the list to the “D3” c. Do I need only to click the code (screenshot is attached) to let it work Best Jamal |
#4
|
||||
|
||||
![]()
Jamal,
You do not need to copy the code to your file. Simply open the 'Acronym Manager' document, switch back to the document you want to process, press Alt-F11, then click on the 'Acronym Manager' macro in the the 'Acronym Manager' document's 'ThisDocument' module and press F5. The only reason for copying the 'Acronym Manager' macro anywhere is to copy it to the document template (eg Normal.dotm) so that you can use it via Alt-F8 - with the acronym/abbreviation list stored in a separate document that the macro calls.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]() Quote:
1. I opened both files (the one I need to process and 'Acronym Manager' document (attached) 2. While the current document is on the one I need to process I pressed Alt+F11 (attached) 3. I clicked the 'Acronym Manager' document (attached) and then pressed F5 4. Nothing happens to the file that I need to process! The “National Spatial Plan” is not replaced by “NSP” Where might be my mistake? Best Jamal |
#6
|
||||
|
||||
![]()
Have you added and entry for “National Spatial Plan <tab> NSP” to the 'Acronym Manager' document? I don't see any evidence of it in your screenshots.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]() Quote:
That’s for sure. If you check the screenshots of post #16 then you should find that the “National Spatial Plan <tab> NSP” is there (also attached here)! What might other issues that I should consider to make this macro work? |
#8
|
||||
|
||||
![]()
In your modified 'Acronym Manager' document, it appears you have a space after 'Plan'. Since your test document doesn't have the space, the expression won't be found. Suggested solution: delete the space after 'Plan'.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
![]() Quote:
Very much appreciated Paul for the help. It worked like a charm As usual, you are a star. Best Jamal |
#10
|
|||
|
|||
![]()
Thanks for the code. I'm getting a runtime error 9 - subscript out of range.
When I debug it's getting stuck here: StrExp = Split(Split(FRList, vbCr)(j), vbTab)(0) I've saved the downloaded word doc as AcronymList.doc and put it in my documents folder. Anyone any ideas what I might have done wrong? I'm a little familiar with VBA but definitely no expert so it's hopefully something obvious to everyone else. Thanks in advance. |
#11
|
||||
|
||||
![]()
You should ensure your document satisfied the requirements of post # 11: https://www.msofficeforums.com/word-...html#post44875
The fact you're getting an error there suggests you have one of more paragraphs that do not include tab characters.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#12
|
|||
|
|||
![]()
The use of an abbreviation following the first use of a term and the abbreviation throughout the rest of the document is actually a poor documentation practise.
A more user friendly way is to have a 'Glossary' at the start of the document which groups all the abbreviations used in the document and which makes it much easier for any user to find a definition, particularly if they start reading part way through the document. |
#13
|
||||
|
||||
![]()
You're entitled to your opinion, of course, but the practice is quite common and spares readers having to turn to a glossary the first time they encounter an abbreviation. Glossaries usually go at the end of a document, not at the start. Definitions, on the other hand, usually go near the start - but not at the very start.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding All Non-spelling Words in a Paragraph to Dictionary | SQLUSA | Word | 5 | 07-13-2012 04:05 AM |
Why Words doesn’t show the style of the selected words automatically???? | Jamal NUMAN | Word | 0 | 04-14-2011 03:20 PM |
How to take the tick out of Spelling in GPO? | Swarv | Word | 0 | 09-29-2010 02:16 AM |
Automating an address from an Abbreviation | Panzer | Word | 0 | 04-12-2010 06:11 AM |
UK spelling on emails | matthew.canwell | Outlook | 0 | 06-19-2009 06:34 AM |