Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
GMatiasevich GMatiasevich is offline
external usenet poster
 
Posts: 1
Default Superscript formatting in Find/Replace

I need to find a way to format text that contains both superscript and normal
characters. I am trying to find a way to do a find/replace command that
accomplishes the following:

[superscript numbers]. to .[superscript numbers]

The numbers in question are reference citations, so I can't just type in the
actual numbers; I need something that will grab all superscript numbers and
treat them as a single unit that I can move the period around. Doesn't seem
like it would be this difficult, but I can't find a way to do it. Thanks!
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Superscript formatting in Find/Replace

On Thu, 8 Nov 2007 07:37:04 -0800, GMatiasevich
wrote:

I need to find a way to format text that contains both superscript and normal
characters. I am trying to find a way to do a find/replace command that
accomplishes the following:

[superscript numbers]. to .[superscript numbers]

The numbers in question are reference citations, so I can't just type in the
actual numbers; I need something that will grab all superscript numbers and
treat them as a single unit that I can move the period around. Doesn't seem
like it would be this difficult, but I can't find a way to do it. Thanks!


If these superscript numbers are the only numbers in the document that
are immediately followed by a period, then you can do it with a
wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm).

In the Replace dialog, click the More button and check the box for
"Use wildcards". Then enter this expression in the Find What box:

([0-9]{1,})(.)

and enter this one in the Replace With box:

\2\1

Then click the Replace All button.

The possible problem is that there's no way (except with a somewhat
complicated macro) to make the replacement work only on superscript
numbers, because the search box has no way to specify formatting for
only part of the expression. If there are non-superscript numbers
followed by a period -- for example, a date at the end of a sentence
-- you could manually click the Replace and Find Next buttons to guide
the replacement, or you can post back for help with the macro.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Superscript formatting in Find/Replace

It might help to note that you can replace with formatted strings that are
first copied to the clipboard. This might give you more flexibility by
replacing your search string with ^c

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Jay Freedman wrote:
On Thu, 8 Nov 2007 07:37:04 -0800, GMatiasevich
wrote:

I need to find a way to format text that contains both superscript
and normal characters. I am trying to find a way to do a
find/replace command that accomplishes the following:

[superscript numbers]. to .[superscript numbers]

The numbers in question are reference citations, so I can't just
type in the actual numbers; I need something that will grab all
superscript numbers and treat them as a single unit that I can move
the period around. Doesn't seem like it would be this difficult, but
I can't find a way to do it. Thanks!


If these superscript numbers are the only numbers in the document that
are immediately followed by a period, then you can do it with a
wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm).

In the Replace dialog, click the More button and check the box for
"Use wildcards". Then enter this expression in the Find What box:

([0-9]{1,})(.)

and enter this one in the Replace With box:

\2\1

Then click the Replace All button.

The possible problem is that there's no way (except with a somewhat
complicated macro) to make the replacement work only on superscript
numbers, because the search box has no way to specify formatting for
only part of the expression. If there are non-superscript numbers
followed by a period -- for example, a date at the end of a sentence
-- you could manually click the Replace and Find Next buttons to guide
the replacement, or you can post back for help with the macro.



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Superscript formatting in Find/Replace

Replacement with a formatted string in the clipboard is fine, but you
can't _search_ for a string with mixed formatting except with a macro
that examines the found range.

On Fri, 9 Nov 2007 08:18:14 +0200, "Graham Mayor"
wrote:

It might help to note that you can replace with formatted strings that are
first copied to the clipboard. This might give you more flexibility by
replacing your search string with ^c

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Jay Freedman wrote:
On Thu, 8 Nov 2007 07:37:04 -0800, GMatiasevich
wrote:

I need to find a way to format text that contains both superscript
and normal characters. I am trying to find a way to do a
find/replace command that accomplishes the following:

[superscript numbers]. to .[superscript numbers]

The numbers in question are reference citations, so I can't just
type in the actual numbers; I need something that will grab all
superscript numbers and treat them as a single unit that I can move
the period around. Doesn't seem like it would be this difficult, but
I can't find a way to do it. Thanks!


If these superscript numbers are the only numbers in the document that
are immediately followed by a period, then you can do it with a
wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm).

In the Replace dialog, click the More button and check the box for
"Use wildcards". Then enter this expression in the Find What box:

([0-9]{1,})(.)

and enter this one in the Replace With box:

\2\1

Then click the Replace All button.

The possible problem is that there's no way (except with a somewhat
complicated macro) to make the replacement work only on superscript
numbers, because the search box has no way to specify formatting for
only part of the expression. If there are non-superscript numbers
followed by a period -- for example, a date at the end of a sentence
-- you could manually click the Replace and Find Next buttons to guide
the replacement, or you can post back for help with the macro.



--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Superscript formatting in Find/Replace

True - but depending on what is being sought, it may be possible to find the
search string regardless of its formatting. This is essentially what you
suggested with ([0-9]{1,})(.) which I suspect would have filled the bill for
the OP.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Jay Freedman wrote:
Replacement with a formatted string in the clipboard is fine, but you
can't _search_ for a string with mixed formatting except with a macro
that examines the found range.

On Fri, 9 Nov 2007 08:18:14 +0200, "Graham Mayor"
wrote:

It might help to note that you can replace with formatted strings
that are first copied to the clipboard. This might give you more
flexibility by replacing your search string with ^c

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Jay Freedman wrote:
On Thu, 8 Nov 2007 07:37:04 -0800, GMatiasevich
wrote:

I need to find a way to format text that contains both superscript
and normal characters. I am trying to find a way to do a
find/replace command that accomplishes the following:

[superscript numbers]. to .[superscript numbers]

The numbers in question are reference citations, so I can't just
type in the actual numbers; I need something that will grab all
superscript numbers and treat them as a single unit that I can move
the period around. Doesn't seem like it would be this difficult,
but I can't find a way to do it. Thanks!

If these superscript numbers are the only numbers in the document
that are immediately followed by a period, then you can do it with a
wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm).

In the Replace dialog, click the More button and check the box for
"Use wildcards". Then enter this expression in the Find What box:

([0-9]{1,})(.)

and enter this one in the Replace With box:

\2\1

Then click the Replace All button.

The possible problem is that there's no way (except with a somewhat
complicated macro) to make the replacement work only on superscript
numbers, because the search box has no way to specify formatting for
only part of the expression. If there are non-superscript numbers
followed by a period -- for example, a date at the end of a sentence
-- you could manually click the Replace and Find Next buttons to
guide the replacement, or you can post back for help with the macro.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find & Replace does not find formatting Mike[_7_] Microsoft Word Help 4 August 30th 07 02:39 PM
Find/Replace formatting Mark Microsoft Word Help 2 March 11th 07 06:24 AM
Find & Replace &vba: formatting, like bold [email protected] Microsoft Word Help 4 March 20th 06 11:00 AM
Find & Replace does not find formatting Ed Microsoft Word Help 5 April 1st 05 12:33 AM
How do I find and replace a superscript number in a word? Steve Starling Microsoft Word Help 2 January 28th 05 04:38 AM


All times are GMT +1. The time now is 04:48 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"