Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-04-2024, 06:51 AM
Italophile Italophile is online now Formatting text in VBA Windows 11 Formatting text in VBA Office 2021
Expert
 
Join Date: Mar 2022
Posts: 554
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

That isn't possible because strings only contain text, not formatting. That is why the Range object contains two properties, Text, a string with no formatting, and FormattedText, which does as its name suggests.

To apply a character style you need to insert the text into the document, then apply the style.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting text in VBA Text Wrapping Without a Table or Text-box (Formatting Assistance) COWNoah Word 8 08-08-2023 02:55 PM
Replacing a comment with underline or other formatting (or adding that formatting to commented text) paulkaye Word 4 05-16-2016 05:38 AM
Formatting text in VBA The Logic Behind Apply Formatting of Surrounding Text in Reveal Formatting Pane Instructor Mark Word 4 04-06-2016 01:32 PM
Formatting text in VBA text formatting kjared7 PowerPoint 1 12-26-2014 07:42 PM
Formatting text in VBA Formatting- Apply changes to highlighted text results in same change to other text sential Word 6 01-10-2014 03:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft