11-29-2006, 08:01 AM | #16 |
Connoisseur
Posts: 61
Karma: 108
Join Date: Oct 2006
Location: LA,CA
|
Can you folks help those of us who aren't so familiar with Word macros?
How do you load this? How do you assign it to a button? Can you batch convert with this...say a certian folder of files? Thanks! |
11-29-2006, 08:38 AM | #17 |
Fanatic
Posts: 559
Karma: 1334691
Join Date: Nov 2006
Location: Miami
Device: KH2O, KPW2, KDXG, KPW1, K3, S505
|
To each his own. Here is the revised macro with the space removal and the "" corrected:
' ' ebook_formatter Macro ' Macro created 11/29/2006 ' ' This step take you to the top of your document Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:="1" ' This step clears formatting and sets font to my preferred size ' Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting Selection.WholeStory Selection.Font.Name = "Times New Roman" Selection.Font.Size = 14 With Selection.Font .NameFarEast = "" .NameAscii = "Times New Roman" .NameOther = "Times New Roman" .Name = "" .Size = 14 .Bold = False .Italic = False End With ' This step replaces hard page breaks ' With Selection.Find .Text = "^m" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' This step replace the correct paragraph mark with a temporary sign "#*#", if your document has that sign, replace ' with some other special character ' With Selection.Find .Text = "^p^p" .Replacement.Text = "#*#" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' This step will replace the inappropriate line break with a space. Also see remark below ' With Selection.Find .Text = "^p" .Replacement.Text = " " .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' This step will return the paragraph break to normal ' With Selection.Find .Text = "#*#" .Replacement.Text = "^p^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll 'this section will remove multiple spaces. If you do not want 'two spaces after the ending period then remove the first and last 'paragraph in this section. ' Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ". " .Replacement.Text = "#!#" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With With Selection.Find .Text = "([ ]{2,6})" .Replacement.Text = " " .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = False End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = "#!#" .Replacement.Text = ". " .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With End Sub |
Advert | |
|
11-29-2006, 08:43 AM | #18 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Hi valkyriesound,
Proceed as follows. These instructions are for Word 2002, but other versions of Word work pretty much the same way: 1. Run Word. 2. Select the "Tools/Macro/Record New Macro" menu item. This will give you a dialog box into which you can type the macro name. Call it, for example, "FormatEBook". 3. Select the "Tools/Macro/Stop Recording" menu item. You now have an "empty" macro called "FormatEBook. 4. Select the "Tools/Macro/Macros" menu item, select the "FormatEBook" macro, and click the "Edit" button. This will open the VB editor on the macro, which will start with a line saying "Sub FormatEBook()", have a couple of comment lines beginning with a single quote, and finish with the line "End Sub". 5. Copy the text of the book formatting macro from the previous page, and press "Ctrl+C" to copy it to the clipboard. Go back to the VB editor, position the cursor on the line underneath the "Sub FormatEBook()" line, and press "Ctrl+V" to paste the text into the macro. 6. Click the "Save" button, then close the VB editor. Now, all you have to do is simply load a text file into Word, and then select "Tools/Macro/Macros". Double click the "FormatEBook" macro to run it. Hope that helps. |
11-29-2006, 10:17 AM | #19 |
Fanatic
Posts: 559
Karma: 1334691
Join Date: Nov 2006
Location: Miami
Device: KH2O, KPW2, KDXG, KPW1, K3, S505
|
Hi valkyriesound,
And a jolly HO JO TO HO to you. To put a button on your menu bar 1. Right click on the menu bar and select customize. 2. Scroll down the categories window until you see macro; click it. 3. Under commands select the name of the macro. 4. Left click drag and drop the macro unto the toolbar. The macro name will now appear on the tool bar. 5. Right click on the name and you can select an icon image for the macro. 6. You can then change the selection to only show the icon image and not the name. Good luck. |
11-30-2006, 04:02 PM | #20 |
Lovin' the e-book life...
Posts: 633
Karma: 2509
Join Date: Nov 2006
Location: Colorado
Device: Ebookwise 1150, Sony PRS-505, Amazon Kindle, BeBook (with OpenInkpot)
|
One of my wishes for this would be to have a "sony reader viewer" application or something similar so that I could drag my text to that and it would show me exactly what the text would look like on my Reader.
I'm on a Mac so not sure if you PC guys have that or not with your software bundle. I have a great one that allowed me to convert for my Ebookwise reader. It would show me exactly what it would look like in my reader--proportions, pic quality and formatting. It sucks having to run a macro on my text and then having to copy it it the Sony Reader to find out if it works or not. I have a pretty good idea of how it will look but sometimes there is the odd file that looks beautiful on my computer, but when it gets to the reader, the formatting is still off. Of course, this doesn't irritate me enough to get rid of my Reader or my Mac, but it can be a pain sometimes... |
Advert | |
|
11-30-2006, 04:31 PM | #21 |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
The Connect software does show us poor PC'ers what the file will look like on the Reader before we load it over there. On a related note, I have seen some indication recently that there might be some movement on porting the Connect software to the MacPuter -- and maybe even WinVista.
The Connect software doesn't allow you to see a full page at a time on the PC though. You have to scroll each page, and move page by page (2 different controls in the software ), I'm hoping that might get changed in an update. BTW, where can we find the Jack Banen e-books? |
11-30-2006, 10:00 PM | #22 | |
Recovering Gadget Addict
Posts: 5,381
Karma: 676161
Join Date: May 2004
Location: Pittsburgh, PA
Device: iPad
|
Quote:
|
|
12-04-2006, 07:17 AM | #23 |
Fanatic
Posts: 559
Karma: 1334691
Join Date: Nov 2006
Location: Miami
Device: KH2O, KPW2, KDXG, KPW1, K3, S505
|
I got tired of going through the properties menu to fill in the the title and author information in converted files so I modified the Word macro to pop up a window at the start which lets you fill the information in. The window is non-modal so you can cut and paste the author and title from the document.
Download the zip file, expand the two files in its contents. Open word, open macros. Select the old macro or if you have never installed this macro before follow instructions elsewhere on this thread. Edit the macro. Drag and drop the two files in the sip unto the forms item in the macro window. Cut and paste the macro text below. Sub ebook_formatter() ' ' ebook_formatter Macro ' Macro created 11/28/2006 by Jorge Espinosa ' ' This step take you to the top of your document Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:="1" ' Author Title Box ' title_author_form.Titlebox = ActiveDocument.BuiltInDocumentProperties("Title"). Value title_author_form.Authorbox = ActiveDocument.BuiltInDocumentProperties("Author") .Value title_author_form.Show ' This step clears formatting and sets font to my preferred size ' Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting Selection.WholeStory Selection.Font.Name = "Times New Roman" Selection.Font.Size = 14 With Selection.Font .NameFarEast = "" .NameAscii = "Times New Roman" .NameOther = "Times New Roman" .Name = "" .Size = 14 .Bold = False .Italic = False End With ' This step replaces hard page breaks ' With Selection.Find .Text = "^m" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' This step replace the correct paragraph mark with a temporary sign "#*#", if your document has that sign, replace ' with some other special character ' With Selection.Find .Text = "^p^p" .Replacement.Text = "#*#" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' This step will replace the inappropriate line break with a space. ' With Selection.Find .Text = "^p" .Replacement.Text = " " .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' This step will replace the double spaces sometimes created by previous replace. ' With Selection.Find .Text = " " .Replacement.Text = " " ' if there is a space at the end of the line, change this to "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' This step will return the paragraph break to normal ' With Selection.Find .Text = "#*#" .Replacement.Text = "^p^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll End Sub |
12-04-2006, 08:38 AM | #24 |
Technogeezer
Posts: 7,233
Karma: 1601464
Join Date: Nov 2006
Location: Virginia, USA
Device: Sony PRS-500
|
Downloaded a copy. I will give it a spin later today.
|
12-04-2006, 11:29 PM | #25 | |
Addict
Posts: 209
Karma: 999496
Join Date: Sep 2006
Location: California
Device: Kindle 3
|
Quote:
Yes you can see the whole page at once. I assume you're looking at the header above the page, the one with Author, File Type, Modified, File Size, and Path. Just below that you'll see a horizonally elongated oval centered between that header box and the text box. Mouse over it, and it turns white. Double-click that to hide or reveal the header. When you hide it, the full page of text is displayed. No more scrolling! (Wow, I figured out something NatCh didn't know!) |
|
12-05-2006, 11:05 AM | #26 |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
I'm glad that works for you, Michele, but it only shows about 2/3 of the page for me.
Perhaps your monitor is larger than mine, sensei. |
12-05-2006, 11:15 AM | #27 |
Addict
Posts: 209
Karma: 999496
Join Date: Sep 2006
Location: California
Device: Kindle 3
|
How strange. Mine is definitely full page, no scrollbar on the side, text continues appropriately on the next page.
You must be doing it wrong. Are you using a widescreen monitor? |
12-05-2006, 01:04 PM | #28 |
Lovin' the e-book life...
Posts: 633
Karma: 2509
Join Date: Nov 2006
Location: Colorado
Device: Ebookwise 1150, Sony PRS-505, Amazon Kindle, BeBook (with OpenInkpot)
|
NatCh and Bob Russell,
Hey guys, I missed the update on this thread, so I didn't see your questions about the Jack Banen books! Sorry! It's a character I created inspired by all the fun I had reading the old John Carter of Mars and Doc Savage books after I discovered e-books. I sorta "tricked" my son into reading more by writing some action stories that would interest him. I would bounce ideas off of him and then write some short stories; so naturally the curiosity got him to read more. Anyway, some friends found out, they read the books and liked them. Then it just sort of became a real project. The downside is that I have some fun story ideas and enjoy the writing but I have very poor grammar skills!! I'm taking some writing classes at a local community college and learning what I should have learned long ago in high school. I plan to have them be free e-books and just good old-fashioned fun reads. I'm working on a website with Jack Banen character info, artwork and various related items. I'm an artist, so I have already done the artwork for the book covers and everything as I'm learning to writing better. So thank you so much for your comments on my avatar pic, I wanted a retro sci-fi/action hero kinda vibe thing. Ok, so long story made shorter: Stories are written, but they're in the process of being cleaned up and edited. Artwork has been designed because I am inpatient and enjoy doing the paintings and book covers. Website has been registered and I'm working on the design. It'll all be free and promoted in the spirit of enjoying ebooks and of course, I'll have them all formated in the different ebook formats as well as RTF and TXT. Sorry to all for reading my long off-topic post, but I didn't want anyone to think I was ignoring them. |
12-05-2006, 01:14 PM | #29 | |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
Quote:
|
|
12-05-2006, 01:18 PM | #30 | |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
Quote:
Do let us know whent you get there, the cover avatar-art has me intrigued. |
|
Tags |
content, conversion, formatting |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word Macro: Footnotes to inline text ? | Hadrien | Workshop | 17 | 10-08-2011 01:28 PM |
Macro photos of Vizplex E Ink | Magnesus | General Discussions | 4 | 04-23-2010 03:04 PM |
Spelling Macro | PieOPah | Workshop | 36 | 12-13-2008 02:27 AM |
Emdash - punctuation macro | ProDigit | Sony Reader | 8 | 11-28-2008 02:32 AM |
Macro help - Itals from txt | edbro | Sony Reader | 14 | 11-16-2007 07:47 PM |