Logos Personal Book Macros for MS Word

I am wanting to learn how to make Personal Books. In searching around, I found that a gentleman by the name of Steve Clark maintained a set of Macros for MS Word to help with making them. In reading through a couple threads I found, it seems Steve passed on to glory a few years ago. Here are some of the threads I found:
https://community.logos.com/forums/t/37157.aspx
https://community.logos.com/forums/t/116984.aspx
A few others have contributed Macros in the forum, too.
It seems the Macro templates and code aren't actively maintained. I am reasonably capable of doing so and maybe even improving them. The catch is, I really don't know much about PB's but I have a strong interest in using them. I have taken all the Macros I could find and built an initial template with them, just trying to make sure I could get them working (unfortunately, I don't know what many of them are intended to do, exactly).
I also noticed that some people had trouble getting these working on Office365. I think I was able to figure out what the problems with that are (some bugs in Office, and increased security settings more than likely). As a workaround, I figured out a slightly different approach than using .dotm (template) files as Steve originally had. The workaround is to basically use a .docm file and manually make a copy of it every time you want to start a new PB...not really a big deal. A benefit of this approach is the custom ribbon/buttons that Steve originally setup can be embedded in the file, independently and don't need to be "installed" which makes things a little easier.
I'm attaching my first working copy of the file here. I'd like to know: 1) how much interest there it in having this maintained; 2) if there are some folks here that make PB's and are willing to test this out and; 3) If there is a decent amount of interest and someone is willing to test it, if someone would be willing to give me a quick tutorial on PB's. I can read through the wiki, etc. but it would be really helpful, in particular, to see it in action from someone experienced...ideally from someone that is familiar with the macros that can explain to me how they use them. That should give me some ideas for improving them (and maybe help me find problems in my file to fix).
Comments
-
I'm going to play around with this. Would be a wonderful feature.
0 -
Thank you! Please let me know how it goes.
0 -
Could you have make the code available in a Word document as text rather than VBA macros? Save it as docx (or plain text, or whatever--just not as macros).
That would reduce security concerns,0 -
I *can* but one still needs to create a macro-enabled file (.docm) and import the code. Given the latency and nature comments in the prior macro threads, I am guessing most people don't even know how to inspect it so all they'd be doing is foregoing a couple warnings.
It really just adds extra steps that I'm guessing most people want to (or need to if they barely know what we're talking about) avoid. Windows will initially block them in a download and one will have to unblock the file.
I understand the concern (I have 25 years in Cybersecurity) but at this point my main goal is to get them working and ensure they are usable. None of it is even really *my* code, at this point. Everyone should always be cautious and they'll just have to weigh the risks associated with getting the file from a user in this forum for what they think those risks are.
If anyone wants to know more about me than what is visible in my profile to assess my trustworthiness, feel free to send me an email or message.0 -
My request is no reflection on your character or work compiling macros. You seem like a great person. I think what you are offering is a beneficial service.
1. The security concern I mentioned is more than a matter of enabling macros judiciously--generally a bad idea--even if we do it all the time. It is about changing security settings in Word that expose Word to multiple security risks, just to enable the macros. That is not an acceptable cyber-security risk.
2. You say that: "None of it is even really *my* code." No doubt you have inspected all of the code carefully. Thanks. But I want to see code created by unknown strangers before I run it. Running an unknown macro is a well-known and ubiquitous risk. It is a risk I once took and regretted after having every Word document on an isolated workplace computer infected by a virus. So, I am skittish.
3. Copying and pasting the code to a Word document should not flag the file for security, and should take only a few seconds. If you want to offer Word documents with a lot of unknown code--that is your business, but I can only advise people that this is a bad practice that will almost certainly lead to regrets and is not a reasonable cybersecurity risk
Either way, thanks for your efforts in this. I hope I can help.0 -
Scott Cooper said:
... As a workaround, I figured out a slightly different approach than using .dotm (template) files as Steve originally had. The workaround is to basically use a .docm file and manually make a copy of it every time you want to start a new PB...not really a big deal. A benefit of this approach is the custom ribbon/buttons that Steve originally setup can be embedded in the file, independently and don't need to be "installed" which makes things a little easier.
Hi Scott
the PB tool only works with docx files as source documents. Thus, since macros get lost when saving the Word file as a docx file, one would be well advised to keep the docm file as one's source where later additions, changes, corrections can be made using the macros, and the latest version saved docx file with which to compile the PB ...
I did use your sample docm file and it looked quite well. Since I already have a template docm / dotm file set up with various formatting options for my use with Bible related documents, I am wondering if it is possible to simply copy/export the macro components from the docm file to the template (I am not very familiar with Word functions and inner workings, but would think that it may be possible to copy/export.import macros from one document or template to another)?
Any ideas?
EDIT: I was able to export the macros to a template dotm file ... and when opening a new document, I can access the macros via the macros in the top menu. HOWEVER, there is no link for "Logos Macros" that displays the different macros available in the menu area.
How can I change this so it shows when creating new documents?
Wolfgang Schneider
(BibelCenter)
0 -
Wolfgang Schneider said:
Thus, since macros get lost when saving the Word file as a docx file, one would be well advised to keep the docm file as one's source where later additions, changes, corrections can be made using the macros, and the latest version saved docx file with which to compile the PB
Hi Wolfgang,
Yes, that is the best approach...something like this:
1) Make a copy of the .docm provided (keeping the original blank).
2) Use the copy to make your PB.
3) Use "Save as" to make a .docx file for uploading into Logos. Keeping the .docm will allow you to make edits and resave, when necessary.Exporting/importing the macros is fairly straightforward. You just need to make sure you get all the modules and forms from the VBA editor. The customizations to the Ribbon (toolbar) are necessary if you want to run the macros that way (many of them are not linked to a button). I used a different tool/method (Office RibbonX Editor) to customize this in the file I provided. It's a different approach than the original author used where he crated a custom Ribbon and exported it. If you simply use the file I provided as a source for your PB's you won't need to mess around with importing the custom Ribbon (or auto loading from a template). As you have noticed, the difference is you won't have those menus outside of the files it's embedded in. I think this is an easier and cleaner approach. You *can* export the Ribbon customizations and import them into Word (I think it will then store them in your global template). I'm not sure I would recommend that as it would be useless without the macro code.
Is there anything in your template that would be useful to include in the macros file? If so, I could look at incorporating it. I've been looking more closely at the macros and starting to learn the PB tags. I anticipate making a number of changes, as I'm able to, so if you play around with the file I posted, just recognize it will be deprecated fairly quickly.0 -
Hi Scott,
Scott Cooper said:... As you have noticed, the difference is you won't have those menus outside of the files it's embedded in.
Another difference would be that I would only be working with a docx file in which I would make editions, changes, etc. and not have to work with both a docm and a docx file, since the macros would be available inside the docx file.
Scott Cooper said:I think this is an easier and cleaner approach. You *can* export the Ribbon customizations and import them into Word (I think it will then store them in your global template). I'm not sure I would recommend that as it would be useless without the macro code.
...
Is there anything in your template that would be useful to include in the macros file?
I thought the ribbon customization was part of the macro module and would be imported into a file or template as part of the macro functions in your docm file. That doesn't seem to be the case even though it's obviously included in the docm document template ...
I'll test some more with some of my PB projects and see how it will work out for me.What I needed to do for my use was to adjust the various text formats I use in my docx since these were quite different from what you have in your sample docm file.
Wolfgang Schneider
(BibelCenter)
0 -
Scott Cooper said:
... I anticipate making a number of changes, as I'm able to, so if you play around with the file I posted, just recognize it will be deprecated fairly quickly.
Hi Scott,
thus far, in a current new file I've used the macros for inserting "Milestones" and some "DataLinks" and found them to be helpful.
Are you planning on posting an updated file in the forum?Wolfgang Schneider
(BibelCenter)
0 -
Wolfgang Schneider said:
Are you planning on posting an updated file in the forum?
Hi Wolfgang,
Thank you so much for the feedback. Yes, I have made significant improvements and am attaching a new file. I'd prefer to update the original post to replace the file but I don't see a way to do that. Anyway, here are the significant changes:
- Removed a lot of macros that I had imported from user DominicM (I think that's the name, sorry if I'm wrong) that weren't linked to buttons. It seems he has a lot of useful routines but there's no point in including them until I work through them.
- The code has been significantly optimized. There are far fewer lines of code and is now actually more functionality.
- The Ribbon has been reworked. I removed a couple things until I figure out the code and added/improved a few things. There are some placeholders in there, too...mainly the "Automations" group to give you an idea of what I'm planning. Again, I'm new to PB's so ideas from people that know them better are welcomed and appreciated.
Specific comments on and changes to the functionality:
- For the Milestones, DataLinks, and Fields groups, you can now insert individual tags OR highlight a block of text to wrap in a tag (or beginning/ending tags). For the Fields, if you have a selection highlighted and press one of the buttons that would normally insert a beginning/end tag, it will prompt you to wrap the text or cancel.
- I have NOT done much with the Links group. I'm not sure if it's working or not and I'm not sure when I'll get to it. I need to review the PB documentation and ensure I know how they are supposed to work.
- The Fields group uses drop-downs now to save space on the Ribbon. It may not look pretty but it works.
- On the Tools group, I reworked a button the original author had used to toggle the Bible verse picker form on/off (i.e. to automatically launch it when inserting a Bible Milestone or DataLink tag). I made it a checkbox which is more intuitive...now you can see when it's on/off - you couldn't before. The "Strong's Toggle" is a placeholder. I plan to make a form much like the Verse Picker for Strong's tags.
- As I said, the Automations group is intended to show some things I'm planning. There is ONE working example that I've included. If you hit the "Run Multiple" button, it will launch a dialog that has an option to add page numbers through a document. If you want to quickly test this, you can type: "=lorem(10,20)" in Word and hit enter. This will generate about three pages of placeholder text. Then hit the "Run Multiple" button, check the box to "Add page number tags" and then hit "Run Automations"
Hope this is helpful. Please let me know if you notice any problems or have any idea.
7573.Logos_Macros_v0-9-3_DEV.zip
Thanks and God bless you!
Scott
0 -
Scott Cooper said:
Specific comments on and changes to the functionality:
- For the Milestones, DataLinks, and Fields groups, you can now insert individual tags OR highlight a block of text to wrap in a tag (or beginning/ending tags). For the Fields, if you have a selection highlighted and press one of the buttons that would normally insert a beginning/end tag, it will prompt you to wrap the text or cancel.
- I have NOT done much with the Links group. I'm not sure if it's working or not and I'm not sure when I'll get to it. I need to review the PB documentation and ensure I know how they are supposed to work.
- The Fields group uses drop-downs now to save space on the Ribbon. It may not look pretty but it works.
- On the Tools group, I reworked a button the original author had used to toggle the Bible verse picker form on/off (i.e. to automatically launch it when inserting a Bible Milestone or DataLink tag). I made it a checkbox which is more intuitive...now you can see when it's on/off - you couldn't before. The "Strong's Toggle" is a placeholder. I plan to make a form much like the Verse Picker for Strong's tags.
- As I said, the Automations group is intended to show some things I'm planning. There is ONE working example that I've included. If you hit the "Run Multiple" button, it will launch a dialog that has an option to add page numbers through a document. If you want to quickly test this, you can type: "=lorem(10,20)" in Word and hit enter. This will generate about three pages of placeholder text. Then hit the "Run Multiple" button, check the box to "Add page number tags" and then hit "Run Automations"
The Milestones, DataLinks, and Fields groups appear to be working nicely, which for me already is valuable since for me these are the most used in creating PBs. I also find the Bible verse solution in the Tools group helpful.
The items in the Links group produce "run time error" messages, in addition I am not sure how they are intended to work ... it may become clearer once more has been done on these.
I appreciate your efforts ... thank you very much.
Wolfgang Schneider
(BibelCenter)
0 -
I've made some significant improvements to this.
- The "Verse picker" now limits the verse numbers based on the book and chapter selected so you can't mistakenly choose a verse that doesn't exist. It also has separate tabs that allow you to choose a custom range for a passage, as well as view a list of pericopes by book to select the appropriate range.
- The "Automations" group launches a window that has a number of options for cleaning up text that you've copy/pasted from an online source (e.g. Project Gutenberg). I will eventually writeup instructions and hope to post a video discussing how to use it but for now, it shouldn't be too hard to figure out. It allows you to re-map heading styles to the default ones in Word. If you have text that has headings but they are regular paragraph styles, but they follow a pattern (i.e. all caps), there is a function to detect and convert them to headings. Lastly, there are a number of general cleanup options like removing double returns, hyphens, images, highlighting, etc.
I still haven't done much with the hyperlinks. I think if you have one in the clipboard, either an internet URL or from Logos, the macros work but I haven't messed with them much as I'm trying to learn about the different link types and figure out what would be the most useful way to use macros with them.
0 -
Thank you a ton for this labor Scott, it's a huge blessing.
0 -
Thank you, Frank. I enjoy it and only wish I had more time. There are a lot of patristic texts in the public domain or otherwise translated/published online. My goal, personally, is to get these cataloged and make it reasonably easy to get them into Logos as PB's.
If you have any trouble with the file, please let me know.0 -
Scott Cooper said:
My goal, personally, is to get these cataloged and make it reasonably easy to get them into Logos as PB's
That's a commendable goal! Please keep us updated.
I've been searching for a way for a LONG while to automagically add the [[@Bible:book ch:verse]] tagging to documents that have headings like "Matthew 1:1-12". The problem I've run into so far is in order to do it, I have to manually copy paste the "Matthew 1:1-12" heading, and add the @Bible tagging to the original heading, otherwise the heading disappears entirely from the final PB. I've tried all sorts of trickery with the "find and replace" feature in word, but my mind just can't really wrap around how to go about that. Hopefully the feature you're working on may be able to help me with that to some degree!
I have a bunch of docx of Chapel Library's (Welcome to Chapel Library!) free books, that they gave me permission to convert and distribute, and hope to one day add some tagging to them to make them worth while also.0 -
I don't know if I am doing something wrong, but in the previous version of the macros, it "remembers" the book and verse you are working in. So you just click the down arrow to advance to the next verse.
But in the new version, it defaults to a blank field, and you have to select the book, chapter and verse everytime you advance to a next verse?
Thank you
0 -
Hi Sarel,
I'm sure you aren't doing anything wrong. The last update changed a lot and I'm not very familiar with the different ways people create their PB's.
Can you be more specific...are you referring to the single verse selection or the range? How would it best serve your needs...can you describe your workflow? I'm happy to tweak it if you have suggestions for improvement.
0 -
Hi Scott,
Thanks for the reply. I hope I can make myself understandable, as English is not my first language.
If I am converting say, a commentary into a PBB, if I select Matt 12:8, I can choose book, chapter, verse from the window that opens. If I proceed to Matt 12:11, the previous verse is still in the selection box. I then click on the down arrow in the verse box, to proceed to verse 11.
With the new macro, every time I open the selection box, every field is blank, and I have to select book, chapter, verse every time I proceed to the next verse.
In my example, I have done Matt 12:8, and when I click on the Bible icon in the macro to do Matt 12:11, the window that pops up, still has the previous verse in it. It just makes it faster to work through a book.
I hope you can make sense of what I mean?
0 -
Hi Sarel,
Yes, I understand...thank you for the thorough explanation. It's very helpful for me to see how others are using it (or anticipate using it).
I have an idea on how I can add that as a feature on the new form. I'll work on it an post an update soon.Scott
0 -
Thanks, Scott
0 -
Hi Sarel,
Here is an update. I added a "Sticky verse" checkbox on the Verse Picker form. If you check the box, the verse you have selected will still be there the next time you open it. If you clear the checkbox, it will clear the fields when the form closes. Let me know if this helps or if you have any other ideas.
0 -
Hi Scott,
Thank you so much! It works perfectly! So much better than the old system. God bless.
0 -
Scott - this may be a dumb question, but I’m not very familiar with Word macros…how do I add this macro to Word to be able to use it on a personal book?
0 -
Hello Scott
To be honest I haven't downloaded your macro and I havent't tested it.
But I have some questions:
For example I have a Bible texts
Matt 1:1 bla bla. Matt 1:2 bla bla.
Can I simply select the passage or the whole chapter and your macro recognize the verse reference (like the ref tagger) plus it adds the other tags to:
[[@BibleNA27:Mt 1:1]]1 {{field-on:bible}}bla bla.@{{field-off:bible}} [[@BibleNA27:Mt 1:2]]2 {{field-on:bible}}bla bla.{{field-off:bible}} ?
So it automatic close the field before the new verse ref is coming.
Maybe with the choose of Bible, BibleESV etc.
Maybe with the firs 1 as initial as option. For the number there is also a search field chapternum which you can add.
Maybe with the verse refs which is bold above in the sample as superscript as option?
And another idea:
If I want to tag the Field List https://wiki.logos.com/Search_Fields_List. Can I select the part and then choose (drop down menu), or type the field name and your macro does the rest.
Probably with the last 5 remembered so it is very fast.
Probably with a key so the last is easy to repeat. Or the last 5 with different keys.
Thanks
Χριστὸς ἐν ὑμῖν, ἡ ἐλπὶς τῆς δόξης·
0 -
Hi Jon, sorry I just saw this. As long as you have macros enabled and can run macro-enabled files, all you need to do is make a copy of my file to use as the basis for each new personal book you work on.
If your security setting prevent running macros, there are Microsoft articles on that.
0 -
Hi Jon, sorry I just saw this. As long as you have macros enabled and can run macro-enabled files, all you need to do is make a copy of my file to use as the basis for each new personal book you work on.
If your security setting prevent running macros, there are Microsoft articles on that.
0 -
Hi Fabian, just catching up on these...sorry.
I'm not sure I understand all your questions. The macros don't retrieve text like Reftagger does. Basically, you either: 1) generate tags (open/close pair) and type or copy/paste your text between the open/close tags; or 2) highlight a block of text then select tags to encapsulate it.
In the latest version, search fields are selectable from a dropdown. I've included the ones that I think are most commonly used and can add others if there is a need.
0 -
-
Thank you, Fabian.
Can you let me know the exact steps to reproduce that?0 -
Hello Scott
Ooops I have forgotten to answer.
Yes sure. Choose Verse Picker. It works for the Book, but by choosing the chapter it ....
I have now a new wish.
Can you add the languges fields? This is good for Lexicons. Especially for Greek and Hebrew. But best you add all the languages, which are possible.
Would it be possible to make the last action again. Like Control+F4 (Win) and Command+Y (Mac)?
Would it be possible to work with the trackpad on Mac for the Verse Picker? Currently it doesn't work. We have to use the scroll bar.
Thanks
Fabian
Χριστὸς ἐν ὑμῖν, ἡ ἐλπὶς τῆς δόξης·
0