I have created new style "Case Cite" as applying Italics.

I recorded two new macros to apply "Case Cite" and "Emphasis" to selected
text; both macros select styles from the tool-bar, type in the style name,
and end with "Enter." I created new macro buttons for each. They all work
as expected.

I then wanted to be able to return text that I'd styled as "Case Cite" or
"Emphasis" to "Normal" text. I recorded a similar macro to reapply "Normal"
to the styled text. But this recorded macro results in the text being styled
"Case Cite + Normal" or Emphasis + Normal" rather than merely "Normal." When
I enter the same routine manually, it generates the expected "Normal" style.

I would sincerely appreciate any suggestions or explanations.

Very respectfully,
Larry

RE: A recorded macros to assign style "Normal" doesn't work by LarryRoot

LarryRoot
Tue May 22 12:19:01 CDT 2007


Ooops. I'm using Word 2002 SP3.
"Larry Root" wrote:

> I have created new style "Case Cite" as applying Italics.
>
> I recorded two new macros to apply "Case Cite" and "Emphasis" to selected
> text; both macros select styles from the tool-bar, type in the style name,
> and end with "Enter." I created new macro buttons for each. They all work
> as expected.
>
> I then wanted to be able to return text that I'd styled as "Case Cite" or
> "Emphasis" to "Normal" text. I recorded a similar macro to reapply "Normal"
> to the styled text. But this recorded macro results in the text being styled
> "Case Cite + Normal" or Emphasis + Normal" rather than merely "Normal." When
> I enter the same routine manually, it generates the expected "Normal" style.
>
> I would sincerely appreciate any suggestions or explanations.
>
> Very respectfully,
> Larry
>
>

Re: A recorded macros to assign style "Normal" doesn't work by Jay

Jay
Tue May 22 12:34:06 CDT 2007

First, a direct answer to your question: The code to remove all applied
style and direct formatting from the selected text is

Selection.ClearFormatting

Second, you don't need any macros for what you're doing. You can assign any
style (or any other built-in command) directly to a button or shortcut key.
Follow the directions in
http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm or
http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm and
choose the "Style" category in the Customize dialog.

Also, by default the ClearFormatting command is assigned to the shortcut
Ctrl+spacebar.

--
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.

Larry Root wrote:
> Ooops. I'm using Word 2002 SP3.
> "Larry Root" wrote:
>
>> I have created new style "Case Cite" as applying Italics.
>>
>> I recorded two new macros to apply "Case Cite" and "Emphasis" to
>> selected text; both macros select styles from the tool-bar, type in
>> the style name, and end with "Enter." I created new macro buttons
>> for each. They all work as expected.
>>
>> I then wanted to be able to return text that I'd styled as "Case
>> Cite" or "Emphasis" to "Normal" text. I recorded a similar macro to
>> reapply "Normal" to the styled text. But this recorded macro
>> results in the text being styled "Case Cite + Normal" or Emphasis +
>> Normal" rather than merely "Normal." When I enter the same routine
>> manually, it generates the expected "Normal" style.
>>
>> I would sincerely appreciate any suggestions or explanations.
>>
>> Very respectfully,
>> Larry



Re: A recorded macros to assign style "Normal" doesn't work by Jay

Jay
Tue May 22 12:45:57 CDT 2007

Oops, that should be Ctrl+Q rather than Ctrl+spacebar.

- Ctrl+Q is assigned to the ResetPara command, which sets the paragraph back
to its default font formatting.

- Ctrl+spacebar is assigned to the ResetChar command, which is similar but
resets character formatting rather than paragraph formatting.

Jay Freedman wrote:
> First, a direct answer to your question: The code to remove all
> applied style and direct formatting from the selected text is
>
> Selection.ClearFormatting
>
> Second, you don't need any macros for what you're doing. You can
> assign any style (or any other built-in command) directly to a button
> or shortcut key. Follow the directions in
> http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm
> or
> http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm
> and choose the "Style" category in the Customize dialog.
> Also, by default the ClearFormatting command is assigned to the
> shortcut Ctrl+spacebar.
>
>
> Larry Root wrote:
>> Ooops. I'm using Word 2002 SP3.
>> "Larry Root" wrote:
>>
>>> I have created new style "Case Cite" as applying Italics.
>>>
>>> I recorded two new macros to apply "Case Cite" and "Emphasis" to
>>> selected text; both macros select styles from the tool-bar, type in
>>> the style name, and end with "Enter." I created new macro buttons
>>> for each. They all work as expected.
>>>
>>> I then wanted to be able to return text that I'd styled as "Case
>>> Cite" or "Emphasis" to "Normal" text. I recorded a similar macro to
>>> reapply "Normal" to the styled text. But this recorded macro
>>> results in the text being styled "Case Cite + Normal" or Emphasis +
>>> Normal" rather than merely "Normal." When I enter the same routine
>>> manually, it generates the expected "Normal" style.
>>>
>>> I would sincerely appreciate any suggestions or explanations.
>>>
>>> Very respectfully,
>>> Larry



Re: A recorded macros to assign style "Normal" doesn't work by LarryRoot

LarryRoot
Tue May 22 12:50:00 CDT 2007

Jay,

Thank you! I've printed that out and will try its approach.

VERY respectfully,
Larry


"Jay Freedman" wrote:

> First, a direct answer to your question: The code to remove all applied
> style and direct formatting from the selected text is
>
> Selection.ClearFormatting
>
> Second, you don't need any macros for what you're doing. You can assign any
> style (or any other built-in command) directly to a button or shortcut key.
> Follow the directions in
> http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm or
> http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm and
> choose the "Style" category in the Customize dialog.
>
> Also, by default the ClearFormatting command is assigned to the shortcut
> Ctrl+spacebar.
>
> --
> 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.
>
> Larry Root wrote:
> > Ooops. I'm using Word 2002 SP3.
> > "Larry Root" wrote:
> >
> >> I have created new style "Case Cite" as applying Italics.
> >>
> >> I recorded two new macros to apply "Case Cite" and "Emphasis" to
> >> selected text; both macros select styles from the tool-bar, type in
> >> the style name, and end with "Enter." I created new macro buttons
> >> for each. They all work as expected.
> >>
> >> I then wanted to be able to return text that I'd styled as "Case
> >> Cite" or "Emphasis" to "Normal" text. I recorded a similar macro to
> >> reapply "Normal" to the styled text. But this recorded macro
> >> results in the text being styled "Case Cite + Normal" or Emphasis +
> >> Normal" rather than merely "Normal." When I enter the same routine
> >> manually, it generates the expected "Normal" style.
> >>
> >> I would sincerely appreciate any suggestions or explanations.
> >>
> >> Very respectfully,
> >> Larry
>
>
>