I did an Advanced Search and read some topics.
Like st3333ve "Applying a style causes loss of character formats! Why?" I generally use VBA code to apply styles, so an enhancement to my code is a hurdle, but not an obstacle.
"Change paragraph style without losing manual formatting" has some good points too.
In my document I used Shift+Alt+RightArrow to apply the style "Heading 2".
Then the macro "HLinkForum" was run. This macro uses the contents of the clipboard to create a hyperlink to a post/topic in the Forum, AND applies a character style to indicate that is is a Hyperlink to the forum (rather than to the Wiki; or another part in ThisDocument; or to a web URL ...)
Now I am considering specialized macros "HlinkForum", "HlinkWiki", etc. which change only the Font Colour, or perhaps apply a Font Colour PLUS Italics.
I noted the algorithm to change font if a specified percentage content was reached, and the pitfalls surrounding that, but here I explicitly want the character style font to distinguish itself from the paragraph style font.
I'd appreciate any comments before I set to work.
Thanks, Chris
retaining PART of a character style over a Paragraph style.
-
- PlutoniumLounger
- Posts: 15619
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
retaining PART of a character style over a Paragraph style.
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle
-
- Microsoft MVP
- Posts: 1318
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: retaining PART of a character style over a Paragraph style.
As long as you use a paragraph style to apply the underlying paragraph settings and font settings, and a character style to modify the font settings of a part of the paragraph, there should be no problems.
You cannot apply two or more character styles to the same segment of text. The one applied last will override the previously existing one(s).
I'm a bit confused by the post's title: what "PART of a character style" do you intend to retain, under what circumstances?
You cannot apply two or more character styles to the same segment of text. The one applied last will override the previously existing one(s).
I'm a bit confused by the post's title: what "PART of a character style" do you intend to retain, under what circumstances?
-
- 5StarLounger
- Posts: 617
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: retaining PART of a character style over a Paragraph style.
If the character style is used to format half or more of the paragraph, applying a paragraph style will remove it.
Like Jay, I do not understand what you mean by "part of a character style."\
You can create a character style that uses the underlying paragraph font. So, for instance, the default Strong style applies bold formatting to whatever the underlying paragraph style's font happens to be.
What is it you are trying to accomplish, Chris.
Like Jay, I do not understand what you mean by "part of a character style."\
You can create a character style that uses the underlying paragraph font. So, for instance, the default Strong style applies bold formatting to whatever the underlying paragraph style's font happens to be.
What is it you are trying to accomplish, Chris.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- PlutoniumLounger
- Posts: 15619
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: retaining PART of a character style over a Paragraph style.
Thanks for the response Jay.Jay Freedman wrote: ↑03 May 2023, 20:49As long as you use a paragraph style to apply the underlying paragraph settings and font settings, and a character style to modify the font settings of a part of the paragraph, there should be no problems. ,,, I'm a bit confused by the post's title: what "PART of a character style" do you intend to retain, under what circumstances?
The paragraph style "Heading 2" has a font definition of Arial, Bold, 21.5 pt, Colour:Automatic.
I have a character style "TutHlinkForum" which has a font definition of size 12 pt, Colour:Magenta
In writing that I see my mistake: assigning a font size to the character style "TutHlinkForum".
I have been thinking of that during this day.
I created the character style "TutHlinkForum" as clone of (probably) the default character style "Hyperlink", and carried that character style's font size with it.
The truth is that for me, only the colour of the hyperlink character styles matter:-
Magenta for links to Forum posts
Red for Wiki hyperlinks
Green for intra-document hyperlinks
Blue for web links
Sometimes I hyperlink a phrase of text, but often enough I will hyperlink a phrase in a Heading when that phrase leads to a major section in the Wiki, or perhaps to a chapter in the User manual.
I hope that this clears up your confusion.
Your remarks have certainly cleared up my confusion.
Thanks again,
Chris
There's nothing heavier than an empty water bottle
-
- 5StarLounger
- Posts: 617
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: retaining PART of a character style over a Paragraph style.
Note that once your hyperlink field is triggered, the Followed Hyperlink style will be used regardless of the original style used on the link.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- PlutoniumLounger
- Posts: 15619
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: retaining PART of a character style over a Paragraph style.
Thank you Charles; duly noted. And then experimented-with! I opened up a document and found three hyperlinks. I clicked on the first and then on the third, but left the second unused.Charles Kenyon wrote: ↑04 May 2023, 12:36Note that once your hyperlink field is triggered, the Followed Hyperlink style will be used regardless of the original style used on the link.
The first hyperlink changed changed from the standard Blue to what I think is a standard Purple (in MSWord2003)
The third hyperlink remained in its character style (Magenta) "TutHlinkForum"
I think that this contradicts your note, but am not certain of the term "Followed". I think that refers to the fact that "This hyperlink has already been followed (... been clicked-on)"
Cheers, Chris
You do not have the required permissions to view the files attached to this post.
Last edited by ChrisGreaves on 04 May 2023, 21:44, edited 1 time in total.
There's nothing heavier than an empty water bottle
-
- 5StarLounger
- Posts: 617
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: retaining PART of a character style over a Paragraph style.
Yes, it does contradict what I predicted and (I think) my experience. I may have learned something! I've tested and my test corresponds to your results. I think my memory comes from modifying the Hiperlink style or basing a style on that style.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word