Any smart way to change text after : (colon) from italic to normal ?

Hi,

Considering the following example:

SCOTT, P. Institutional World: An Alienated Life. New York: Penguin (2010).

Is there any way to change "An Alienated Life" from italic to normal using any smart way?

At the end, just Institutional World: should be italic. Example:

SCOTT, P. Institutional World: An Alienated Life. New York: Penguin (2010).

The issue is that I have 20 pages which sums around 300 references like that and I would like to select the pages and run some command, a macro, a smart find/replace that somehow could identify=>

1- if there is text in italic

2- if this text has a colon : in between the words in italic

3- then change what is in italic and after the colon : to normal text

Such kind of magic would change my life :)

Many thanks!

Carlos

Try the following macro:

Sub CitationsReformat()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = ""
    .Replacement.Text = ""
    .Font.Italic = True
    .Format = True
    .Forward = True
    .Wrap = wdFindStop
    .MatchWildcards = False
    .Execute
  End With
  Do While .Find.Found
    If InStr(.Text, ":") > 0 Then
      .Start = .Start + InStr(.Text, ":") + 1
      .Font.Italic = False
    End If
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
Application.ScreenUpdating = True
End Sub

For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Paul,

Many many thanks for the information!

First I need to learn how to use macros and I already took a look in the site you kindly indicated.

I will post again as soon as the "experiment" is implemented.

It seems a terrific game to play during the weekend!

Cheers,

Carlos

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I'm not clear why you want to do this: the subtitle is part of the title and should be italicized.
Microsoft MVP (Word) since 1999
Fairhope, Alabama USA
http://ssbarnhill.com
http://wordfaqs.ssbarnhill.com
Screen shots captured with TechSmith's Snagit

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I don't know why, either. I merely showed how it could be done, without passing judgement as to whether it should be done.

Perhaps Carlos has the italicised/plain text requirement confused with the way journal titles and article titles within Journals, etc. are to be cited. Besides which, if they're in a citation field or bibliography field, Word will restore the italicising next time the field updates...

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi!

Thanks for remembering the "citation field or bibliography field" issue.

Actually, I intend to do it after these fields have been removed.

The citation stile I use has this detail of italic in a part of the title and non-italic in the other.

Actually, since it is my first time with macro, I am finishing a writing first and then I'm going to learn how to use the macro. In a couple of days I will return the experiment output!

Best,

Carlos

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 165 Applies to: