Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2024, 11:06 AM
RRB's Avatar
RRB RRB is offline Here is areal doooozy for you geniuses Windows 11 Here is areal doooozy for you geniuses Office 2021
Susan Flamingo
Here is areal doooozy for you geniuses
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default Here is areal doooozy for you geniuses

Greetings to all on this cool Saturday night from the Holy City of Jerusalem!

I think I might be able to stump you geniuses with this one:

I need to ask the user to choose an available char style in the doc. Opening a dialog/list box with a list of the styles, I think I can handle on my own. But is there a way that within this dialog box, the styles should be shown formatted per their actual formatting (font type, bold, etc). I have already been told it cannot be done, but as we know Grandma always said "Never say never".

Thank you and have a good day!

Susan Flamingo
Reply With Quote
  #2  
Old 02-17-2024, 05:20 PM
June7's Avatar
June7 June7 is offline Here is areal doooozy for you geniuses Windows 10 Here is areal doooozy for you geniuses Office 2010
Novice
 
Join Date: Nov 2023
Posts: 20
June7 is on a distinguished road
Default

Maybe this would require custom ribbon coding.
Reply With Quote
  #3  
Old 02-18-2024, 01:37 PM
Italophile Italophile is offline Here is areal doooozy for you geniuses Windows 11 Here is areal doooozy for you geniuses Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by RRB View Post
I need to ask the user to choose an available char style in the doc. Opening a dialog/list box with a list of the styles, I think I can handle on my own. But is there a way that within this dialog box, the styles should be shown formatted per their actual formatting (font type, bold, etc). I have already been told it cannot be done
There is very limited support to set font attributes for User Form controls, but not sufficient to replicate character styles. If your character styles have been named according to their purpose, why would the user need to know what the results will look like?

Quote:
Originally Posted by June7 View Post
Maybe this would require custom ribbon coding.
There is nothing in Ribbon XML to specify font attributes for ribbon controls.
Reply With Quote
  #4  
Old 02-18-2024, 05:38 PM
Guessed's Avatar
Guessed Guessed is offline Here is areal doooozy for you geniuses Windows 10 Here is areal doooozy for you geniuses Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Using a list box in a vba userform, I don't believe you can have multiple items, each with their own font formatting.

To get similar functionality in a userform, I would put a secondary text label with dummy text and have a macro change its formatting depending on the list item selected in actual list box.

If I wanted a visual clue of the styles on the ribbon, just make use of the existing visual displays which already do this. Make sure the character styles were included in the Styles Pane and/or Quick Styles list and check the 'Show Preview' setting is enabled.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Other Forums: Access Forums

All times are GMT -7. The time now is 10:09 AM.


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