User:Cthaeh

From Baka-Tsuki
Revision as of 23:52, 22 November 2012 by Cthaeh (talk | contribs) (italics visual basic macro)
Jump to navigation Jump to search

I guess I'll create this page so the link to my name isn't red anymore...


I'm really thankful for the work the translators (and editors) have done so that I am able to read these light novels; so I figured the best way to show my appreciation would be to do edits. I'm currently slowly reading and editing Toaru Majustu no Index to convert the older chapters to the past tense. I also try to help out with some of the new and ongoing translations if I'm going to read that story and see there haven't been a lot of editors on it.


Italics Macro

Converting Microsoft Word text formatted as italics into the wiki format came up in a discussion. So I copied this (http://www.wordbanter.com/showthread.php?t=72202) visual basic macro and modified it to add the two single quotes around text that is italicized in Microsoft Word. I'll note that the wiki formatting for the copy and pasted code didn't turn out great, so I suggest copying the macro from the edit version of this page if you're going to use it.


Sub convert_italics()

Dim oRange As Range

With Selection .HomeKey (wdStory) .Find.ClearFormatting End With With Selection.Find .Text = "" .Font.Italic = True .Forward = True .Wrap = wdFindStop Do While .Execute Set oRange = Selection.Range With oRange 'remove the italic .Font.Italic = False 'add tags around the text .Text = "" & .Text & "" End With Loop End With

Set oRange = Nothing Selection.Find.ClearFormatting Selection.HomeKey (wdStory) MsgBox "Finished."

End Sub