Summary: This page explains how to use my MS Word Macros to format text for e-Sword.

Online Library | Books by Cox | Tracts | Website | Prayer Letters | Pastor Promos | Positional Papers | Photos | Fun & Goofy | Church Planting | e-Sword | e-Sword Modules | Palm OS | Pocket PC-PPC | Study Links | Links | Website Stats | Contact Us and Donations

 E-Sword Module Database Library

Helps, Modules, and Information website

by Missionary-Pastor David R. Cox (my ministry website)  
 EVERYTHING HERE IS FREE!

Donate
 to us:
 

through paypal : www.paypal.com email dcox and @davidcox.com.mx

If you have a module that you want listed here, or observation on my website, please email me.

New Modules News Page: http://www.squidoo.com/E-Sword 

Email:  Please do NOT repost my e-Sword address because of spammers.        RSS.xml  RSS Help Page NEW!    How to automatically know when this page changes.

Home for e-Sword Cox Pages

 

David Cox's My MS Word Macros for use in
e-Sword Module Creation


 

sidebar
Sitio
en Español

 General 

Home
www.e-sword.net
General Information
(3/07)
Installation: e-Sword
(4/07)
Installation: modules
Latest Version: 7.9.8
How e-Sword Works
(4/07)
Help Desk FAQs
(4/08)
e-Sword on Linux
(09/07)
e-Sword on the MAC
(3/08)
Copyright Stuff
(3/07)

David Cox copyrights (4/07)
Work plans for this site

  Module Downloads 

 David Cox Created Mods

Bible Modules  e-Sw.net
Commentary Mods  e-Sw.net
Dictionary Mods  e-Sw.net
Devotional Mods  e-Sw.net
*  Topic Mods  *  e-Sw.net
Bible Reading Plans
Illustrations
Graphic Mods  e-Sw.net
STEP Mods  e-Sw.net
Request Mods

Premium Mods

  How to use...? 

How to use e-Sword (4/07)
e-Sword Menu
(03/08)
Bibles 
(11/07)
Commentaries
(03/08)
Dictionaries
(03/08)
Study Notes
(03/08)
Topics
Search all Tops
Maps
Bible Readings
Devotionals
Program Panels Layout
Bible Searches
Search between Bibles
Making Verse Lists
(4/07)
Strongs

e-Sword Utilities

MSWord Macros for s-Sword
esword MEd
(11/07)
esword FIn
(11/07)
esword RUn
(no longer available)
Chads Commentary Creator
Best 2.11 & BPest

   How to Create Modules 

Module Creation Updated!
e-Sword MEd
My Word Macros
Creating Bible Modules
Updated!

Creating Commentaries Mods Updated!
Creating Dictionary Mods
Updated!
Creating Topic Mods
Updated!
Creating Devotional Mods New!
Creating Illustration Mods New!

Finnish Resources for -Esword
Swedish Resources for e-Sword

 Overview  

Page Outline


Overview
Format of a BBL
Phase 1: Text Preparation
Part A: I wrote my own
Bible Import Programs
Part B: I am downloading off the Net
Retouching Modules

I lost count on how many e-Sword modules I have made so far, but I think it is getting close to a thousand. I have not found adequate tools to do what I want, and I have had to resort to making my own tools via using Microsoft Word and Word Basic to do the brute grunt work of formatting. Basically I did this originally all by hand and then I started using Word's Search and Replace, but as time went on, I got more "sophisticated" and "professional" (translated that means I got lazy and tired of doing the same thing over and over again).

DISCLAIMER: I am not responsible for any mess my macros make. You use them at your own risk! Do not write me if it erased or corrupted your text!

RULE #1 Backup everything and only use a copy to experiment on. Always have a backup copy to go back to if you mess up something. These macros sometimes will not do what you want them to, and they will corrupt your text.

Basically my macros are not going to do anything damaging to your computer or text, except for making replacements in the text that maybe shouldn't be made. I am still working on perfecting them and getting the bugs out of them. The principle danger of my macros is that the text it works on will make replacements like LeRev 12:12 instead of Lev 12:12. That kind of thing is the problem that I am constantly working on, and there are problems.

If they have errors, then why use them? Good question. I am working on them, and different original texts have different problems, and until I run into them, I cannot know what is wrong to fix. Basically I started out doing search and replaces in Word, and that would take me literally hours for prepping a book for a module. So when I put the steps into a Macro, it basically cut those hours to about 3 minutes for the longest book I had at the time (over a 500 pages). But most of the time the macros run instantly.

If you find something that went wrong in the text, please send me what it was originally and what was the corruption (don't send me your entire file, all I need is a short phrase that caused the problem). For example, "Levit. 12:12" is showing up "LeRev 12:12". That is all I need to test and fix. Write me at davidcox (the at sign) davidcox.com.mx.

Note that there are a lot of Bible verse references that I haven't figured out how to "versify", and my macro seeks to do this, but fails. For example II Corinthians 12:1. I have procedures in the versify macro to convert this. But I do not have the Arabic numerals perfected yet. II Corinthians xii. i. That stills is causing me problems. There are still "hairbrain" abbreviation methods that mess me up also, e.g. I1 Cothns. 12., 1. Believe it or not, this kind of stuff is out there, and to be all things to all hairbrains is difficult, but I am getting there.

 What these Macros Seek to Accomplish (Their Purpose)

Basically there are specific problems that these macros seek to fix. Here I will give you a brief run down of what the macros are, and what they do (should do).

FixBrokenlines - This basically is a situation where a PDF file or a HTML file has line breaks at the end of every line on the screen, and once copied over to your Microsoft Word Document for touch up, these need to be eliminated. The problem is that some paragraph marks should be there, so the macro seeks to skip those that have a sentence final punctuation mark before the break (period, exclamation mark, or question mark) and replace all the others. It will also seek to remove the hyphenation at the end of the line, and rejoin the word parts. See FixBrokenLines Macro.

Versify - This is my largest macro with about 800 search and replaces. Still not working perfectly yet though. It will seek to find all the verses in the text and make them into an e-Sword format. Note that this macro includes

(1) Convert all Bible references to their standard e-Sword format. Note that this macro will not make the correct RTF formatting because that is in a separate macro below. 

(2) Convert Arabic numeral references, e.g. John ix. 12.

(3) It also will interpret the series of references in a single book to separate them correctly, e.g.  John 1:2, 12; 3:4. to Joh_1:2; Joh_1:12; Joh_3:4.

Still future is the ability to discern a consecutive verse reference and combine it, e.g. John 1:12, 13 to John 1:12-13, instead of the present Joh_1:12; Joh_1:13.

WARNINGS: This macro will corrupt text that is in outline (sermon outline) format. For example,

I. asdaskj

A. ASDASD

B. Asdasd

C. Asdasd

II. asdasdas

When I get time, I will work on that, probably breaking that off from the main versify macro as an extra macro.

RefGreen - This is simple code to make the verse references green underlined for the Microsoft Word Doc. This won't show up in an e-Sword module per say, but it helps to format the text in Word so that you can see the verse references. I say it won't work in e-Sword modules, but if you are making a TOP module, it will work for cut and paste into that module, and it will also work if you save your Microsoft Word document in RTF format and import it into the TOP module.

RTFPrepConversion - This makes the Document ready for simple RTF import.

Removecf11 - This is to reverse the RTF formatting if that is sometime necessary.

InvisibleRefs - This makes all the correctly formatted verse references invisible. This helps in scanning for verse references that didn't get converted.

VisibleRefs - This returns the invisible refs back to normal black text. (Note: this is the same as selecting the entire document, and setting the text color to automatic.)

InvisibleWords - This is the companion to the above macro, except it will make invisible all the non-verse reference text.

VisibleWords - This returns the invisible text back to normal black text. (Note: this is the same as selecting the entire document, and setting the text color to automatic.)

Greek - Select a word of phrase and this macro will make the font Greek.

 

 Explaining the Individual Macros  

If you want to make this into a Microsoft Visual Basic Macro, then click on Tools, then Macros, then Visual Basic Editor. Go to the bottom, and add this macro.

Sub RefsGreen()
' Green Macro
' Macro recorded on 11/26/2007 by David R. Cox
'
Replace all Verse References
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([0-9A-z]{1,3}_[0-9]{1,3}:[0-9-]{1,7})"
.Replacement.Text = "(openbracket)\1(closebracket)"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With

Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(openbracket)"
.Replacement.Text = "{\cf11 \ul"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "(closebracket)"
.Replacement.Text = "}"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

' Replace Correct for double coding
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "{\cf11 \ul {\cf11 \ul "
.Replacement.Text = "{\cf11 \ul "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "}}"
.Replacement.Text = "}"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
End Sub

 

 

visits since February 7, 2007