Jump to content

Please read the Forum Rules before posting.

Photo
- - - - -

Formatting problems


  • Please log in to reply
17 replies to this topic

#11 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,891 posts
  • LocationGallatin, TN
Offline

Posted 06 December 2011 - 01:25 PM

Now that I have that setup in Word, that will make things easier. Not sure why I never thought of your idea before. I've been typing Alt-0247 to produce the divide symbol. Uggghhh...

#12 BaptizedBeliever

BaptizedBeliever

    Christian

  • Members (T)
  • PipPipPipPipPip
  • 924 posts
Offline

Posted 06 December 2011 - 01:29 PM

um...no Macros are showing up for me to edit. Am I missing something here?

#13 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,891 posts
  • LocationGallatin, TN
Offline

Posted 06 December 2011 - 01:46 PM

Oh ok, well then Create one with the Create button on the screen where you would normally find existing macros.

Normally, if you were doing search/replace macros or other commands, you would just record the macro. 99% of the time that works. Because you wanted something inserted that's not on the clipboard, we have to manually define the macro. You just need to get to the macro edit screen. Create should do it. Just replace the newly created sample macro code with my code.

#14 BaptizedBeliever

BaptizedBeliever

    Christian

  • Members (T)
  • PipPipPipPipPip
  • 924 posts
Offline

Posted 06 December 2011 - 01:53 PM

ok, got that taken care of. 'Twas a lot of time, but now I can just hit ctrl-m and I've now got my mark. It is a lot easier for me to be able to do this in Word than to work back and forth between Word and ToolTip before doing the final conversion.

Thanks, Josh!

#15 DSaw

DSaw

    Resource Builder

  • Members (T)
  • PipPipPipPipPip
  • 1,159 posts
  • LocationEast Coast
Offline

Posted 06 December 2011 - 02:40 PM

Cobb78

Another way to get rid of text you don't want that is formatted the same is Highlight it right click then select text with similar formatting and all of the same text say all bold text will highlight then press delete

also this could be used to change the text formatting to something else

Edited by DSaw, 06 December 2011 - 02:41 PM.

May God change our hearts to what the truth is

2Ti_2:15 Study to shew thyself approved unto God, a workman that needeth not to be ashamed, rightly dividing the word of truth.

Rom_9:16 So then it is not of him that willeth, nor of him that runneth, but of God that sheweth mercy.

2Ti 2:24-25  And the servant of the Lord must not strive; but be gentle unto all men, apt to teach, patient, In meekness instructing those that oppose themselves; if God peradventure will give them repentance to the acknowledging of the truth; 
 

 

 


#16 SpreadTheWord

SpreadTheWord

    Resource Builder

  • Veterans
  • PipPipPip
  • 41 posts
Offline

Posted 06 December 2011 - 03:21 PM

Ok my turn. :D

I recorded a macro that does a lot of regular expression search and replacements. I have edited it here and there and it's working great. I'm having to run it on certain chapters and I have to change the replacement text in several places before I can run it each time. Mostly Im changing out bible book names. I'm worried with me manualy editing macro each time sooner or later i will make a mistake and then I'll have made a mess of my text. When I run my macro, can MS Word 'ask' me the name of a bible book? And then have my answer appear in the macro instead of me editing the macro?

#17 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,891 posts
  • LocationGallatin, TN
Offline

Posted 06 December 2011 - 03:58 PM

You're right about being bored or tired and making a mistake editing a macro.

Here's some code from one of my macros I'm currently using on a project. I've removed some of the text to make it a simple example to get you started

BookName = InputBox("Book Name")
  
'...Text omitted for the purposes of an easy example...

.Replacement.Text = "÷" + BookName

The purple text creates a variable called BookName. The InputBox causes Word to popup an input box where you can enter the value. The value you enter will be stored in BookName. (Gotta love Visual Basic, how much easier could this be?)

So you want the Bible book name you enter to be used in your replacement text? Just refer to the BookName variable in your replacement text. You should be familar with the .Replacement.Text command from your recorded macro.

Keep your literal replacement text in quotes (as it already is). And break up your replacement text so that where you've been editing the Book name manually, the BookName variable will now appear. Don't put Bookname in quotes. But do use + signs. If you have literal replacement text to go to the right of BookName, just enter a + sign to the right of BookName, followed by the literal replacement text in quotes.

In the example above: ÷ (in quotes so Word knows its a literal) and + BookName (no quotes because its a variable). So if you entered "Matthew" into the input box, then the replacement would be: ÷Matthew. Easy enough.

Attached File  word_input_box.png   16.28K   0 downloads

#18 SpreadTheWord

SpreadTheWord

    Resource Builder

  • Veterans
  • PipPipPip
  • 41 posts
Offline

Posted 06 December 2011 - 06:10 PM

Works perfectly, thank you so much!

I just looked up word macros and visual basic and you can just about write a tooltipping program in MS Word!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs