Greetings Willem and welcome to the forums.
I think you will need to explain a little more about what you are trying to accomplish.
Perhaps a couple of screen shots showing examples of before and after?
The before and after is pretty explicitly given in his original post. No screenshots needed.
Before:
Ps 23:3; 148:5,6,; 150:2; Isa 5:2,5,7; Rev 2:3; 22:5After:
Ps 23:3; Ps 148:5; Ps 148:6; Ps 150:2; Isa 5:2; Isa 5:5; Isa 5:7; Rev 2:3; Rev 22:5
Note that the book abbreviation is replicated before each reference in the "after" list. That's what he's trying to accomplish via a Word macro.
I confess that this looks like a difficult problem to solve in a macro. It could probably be done, but I'm not going to venture an attempt at it, and I used to work at Microsoft as a developer on Word.
Thanks Rosie I will take your 'Word' for it; though your explanation went completely over my head. c’est la vie
I'm scratching my head wondering why this is coming across as so complicated to you. I'll try again, reducing it to a simpler case:
Suppose he has this exact text in a Word document, just a list of several scripture references: "Ps 23:3; 148:5,6"
He wants to find an automated way to replace it (in Word) with the following text instead: "Ps 23:3; Ps 148:5; Ps 148:6"
Notice that the "Ps" is repeated three times in the second list, whereas we knew that 148:5,6 was referring to Psalms in the first list by the positioning of it. He wants that to be made explicit, and even wants verses 5 and 6 to each have a full reference, not be comma separated where we assume they are in the same chapter.
Mind you, I didn't ask him why he wanted to do that, just assumed he had a legitimate need for it.
I also wonder what he would want for a reference like "Pr 3:5-6" -- would he want that expanded to "Pr 3:5; Pr 3:6"?
I'm scratching my head wondering why this is coming across as so complicated to you.
Thanks Rosie - I understand now. I guess my confusion was because I couldn't envisage why one would want to do such a thing.
And just to keep the thread on track I am assuming that what he asks is not easy and that because others haven't chipped in with suggestions might well be very difficult and time consuming?
I'm sure it is programmatically possible. I mean, after all, Logos can deal with a series of references like that when they are found in a book, and it can convert them intelligently to links. But it would be time consuming to write the code to do this, especially as a Word macro. If my brain still functioned like it did 10-20 years ago and if I was still as dedicated to offering gobs of volunteer time to people here, I might take a stab at it. But it's really beyond me at this point. Maybe someone else will want to give it a try.
Thank you Rosie and Mike for your attention to my question.
I found that one can easily do what I want by using Find/Replace in Word using regular expressions.
Probably yes. The difficult part wouldn't be the "expansion" - the macro would keep chapters and books until they change, so the verse would be assigned properly - but the detection of bible references (complete or incomplete) in a text.
By the way, at least in a syntax like above, this is something the forum editor as well as the PB compiler do automatically, and they will expand the incomplete references as we see in this thread and when we build a PB out of the original post:
Thank you Rosie and Mike for your attention to my question. I found that one can easily do what I want by using Find/Replace in Word using regular expressions.
Glad to hear you got it working for you!
Well done Willem
Hang about the forums, someone is bound to ask a similar question and you too can pretend to be an expert. ;-)
I would paste them into a blank sermon builder doc and let Logos expand them. Then export or copy/paste back into Word.
Available Now
Build your biblical library with a new trusted commentary or resource every month. Yours to keep forever.