Echognome Posted February 28, 2010 Report Share Posted February 28, 2010 I am trying to update some system notes and trying to insert color suit symbols in my document. I can think of two ways to do this efficiently and wondered what other people have done. Method 1 - Record a Macro for inserting each suit symbol and assign a hotkey to each macro. Here's the code I wrote for this method: Sub InsertClub() Selection.Font.Color = wdColorGreen Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3929, Unicode:=True Selection.Font.Color = wdColorAutomaticEnd SubSub InsertDiamond() Selection.Font.Color = wdColorOrange Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3928, Unicode:=True Selection.Font.Color = wdColorAutomaticEnd SubSub InsertHeart() Selection.Font.Color = wdColorRed Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3927, Unicode:=True Selection.Font.Color = wdColorAutomaticEnd SubSub InsertSpade() Selection.Font.Color = wdColorBlack Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3926, Unicode:=True Selection.Font.Color = wdColorAutomaticEnd Sub Method 2 - Use the AutoCorrect to insert the suit symbols and then write a macro to go through the entire document and replace all suit symbols with the same symbol but with the respective colors. The advantage of this method is you can use !c, !d, !h, and !s to edit the suit symbols in the document and then do one sweep at the end to attach the colors. The disadvantage is that it doesn't seem to work as I expect it to. Some of the symbols don't get converted and I don't understand why. Anyway, here is the code I have (mainly from recording and replacing code). Sub SuitColors() Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ChrW(9827) .Replacement.Text = ChrW(9827) .Replacement.Font.Color = wdColorGreen End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ChrW(9830) .Replacement.Text = ChrW(9830) .Replacement.Font.Color = wdColorOrange End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ChrW(9829) .Replacement.Text = ChrW(9829) .Replacement.Font.Color = wdColorRed End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ChrW(9824) .Replacement.Text = ChrW(9824) .Replacement.Font.Color = wdColorAutomatic End With Selection.Find.Execute Replace:=wdReplaceAllEnd Sub Any thoughts from other people? What has been successful for you? Any other methods that may work better? Quote Link to comment Share on other sites More sharing options...
Cascade Posted February 28, 2010 Report Share Posted February 28, 2010 I use autocorrect with !c !d !h !s respectively. Autocorrect allows you to correct to formated text. So I have my diamond and heart symbols formated to red coloured text. Quote Link to comment Share on other sites More sharing options...
Echognome Posted February 28, 2010 Author Report Share Posted February 28, 2010 I use autocorrect with !c !d !h !s respectively. Autocorrect allows you to correct to formated text. So I have my diamond and heart symbols formated to red coloured text. Wayne, For some reason I'm having difficulty getting my AutoCorrect to do that. I can have it set to formatted text for the symbol, but I don't know how to change the text color. Any hints? Quote Link to comment Share on other sites More sharing options...
Cascade Posted February 28, 2010 Report Share Posted February 28, 2010 I colour the symbol in word then select it then go to autotext and create the autotext entry. The diamond and heart symbol are automatically displayed in autotext when they are selected in word. When I select formatted text the diamond and heart symbols turn red as the selected text is already red in word. Quote Link to comment Share on other sites More sharing options...
Echognome Posted February 28, 2010 Author Report Share Posted February 28, 2010 Great. Got it to work. Thanks. So to summarize for those that haven't done this. I did the following (easy) steps using Wayne's tips and it doesn't require any macros at all. Note that this was using Microsoft Word 2003. The steps may be different using another version of Word. 1. Go to the Insert menu and select Symbol..2. Insert a Club, Diamond, Heart, and Spade symbol into your document and close the dialog box.3. Highlight your club symbol. Select the font color you would like. I chose green, but you can leave as black if you like. While the symbol is highlighted, go to the Tools menu and select AutoCorrect Options...4. Under the Replace box, I typed !c and the With box was already populated with my green club symbol. Hit the Add button. 5. Repeat steps 3 and 4 for the diamond, heart, and spade symbols. Voila. Anytime you type !c, !d, !h, or !s you will have the colored symbol inserted into your document. Quote Link to comment Share on other sites More sharing options...
JanM Posted February 28, 2010 Report Share Posted February 28, 2010 Slightly off this topic, but also about suit symbols and Word and maybe someone here will be able to solve my problem (which I've given up on - I'm not using Word for bridge notes any more). When I upgraded to the latest version of Word, it decided not to recognize suit symbols any more. If I opened an old document (or someone else's) with suits symbols in it, I got open boxes <grrr>. If I try to do "insert" and put in a suit symbol, it looks as if I should be able to (there's a chart that has suit symbols on it) but when I click on one and then on "insert, even in Times New Roman, which should have suit symbols, I get a box instead of the suit symbol. I have uninstalled and reinstalled Word, tried to point it to the Times New Roman that does suit symbols just fine in Pages (guess I should "confess" that all of this is on a Mac :)). Nothing works. The only way I can read a Word document that has suit symbols is to open it in Pages, where the suit symbols are fine but sometimes the formatting isn't. I'm way too cheap to print notes in color, so I just use outline for the red suits, by the way - it works for me :). Quote Link to comment Share on other sites More sharing options...
Echognome Posted March 1, 2010 Author Report Share Posted March 1, 2010 Slightly off this topic, but also about suit symbols and Word and maybe someone here will be able to solve my problem (which I've given up on - I'm not using Word for bridge notes any more). When I upgraded to the latest version of Word, it decided not to recognize suit symbols any more. If I opened an old document (or someone else's) with suits symbols in it, I got open boxes <grrr>. If I try to do "insert" and put in a suit symbol, it looks as if I should be able to (there's a chart that has suit symbols on it) but when I click on one and then on "insert, even in Times New Roman, which should have suit symbols, I get a box instead of the suit symbol. I have uninstalled and reinstalled Word, tried to point it to the Times New Roman that does suit symbols just fine in Pages (guess I should "confess" that all of this is on a Mac :)). Nothing works. The only way I can read a Word document that has suit symbols is to open it in Pages, where the suit symbols are fine but sometimes the formatting isn't. I'm way too cheap to print notes in color, so I just use outline for the red suits, by the way - it works for me :). Jan - My work recently switched over to 2007, but I have resisted as much as I can. In June, Office 2010 will come out and from what I've heard on the beta, it will be much better than 2007. As for your particular problem, I'm not sure why the suit symbols aren't working. I believe the font I use for the card symbols is Symbol, not Times New Roman. I don't know if that will help you. Good luck. Quote Link to comment Share on other sites More sharing options...
blackshoe Posted March 1, 2010 Report Share Posted March 1, 2010 Try OpenOffice, or NeoOffice on Mac, which has a nice Mac interface (OpenOffice uses the XWindows interface from Unix, I think). The symbols are there, certainly (though I don't know about in color). I haven't tried to work out how to do it, but I'd start by looking at the "Autocorrect..." function, in the tools menu. Quote Link to comment Share on other sites More sharing options...
TimG Posted March 1, 2010 Report Share Posted March 1, 2010 I like your autocorrect solution. I have assigned alt-s to a spade symbol, alt-h to a heart symbol, alt-d to a diamond symbol and alt-c to a club symbol. But, so far as I know, there is no way to make sure the alt-d and alt-h automatically insert a red symbol. So, I have a macro that changes everything when I am done. Do you know if autocorrect can be used with the assigned alt keys to get red symbols? I have noticed that when there are suit symbols in headings that are used for a table of contents entry that there is trouble with toc update. Have you encountered this? Quote Link to comment Share on other sites More sharing options...
Echognome Posted March 1, 2010 Author Report Share Posted March 1, 2010 Tim, I think you can get the colors by using the Method 1 approach I list above and assigned your Alt keys to run the macros. That being said, I'm not sure if you can assign an Alt key or if it has to be a control key, which isn't as nice, since you won't want to replace your meanings for control C, Control D, Control H, and Control S! I think I used Ctrl-Alt-C, etc, but that's more keystrokes. The autocorrect way is really much simpler. I have not used the automatic TOC generator from Word. Well, I have for work, but someone has already built it by the time I look at it. Quote Link to comment Share on other sites More sharing options...
Cascade Posted March 1, 2010 Report Share Posted March 1, 2010 Tim I am not sure about your heading and TOC issue. If you have alt d and alt h assigned to diamond and heart symbols respectively then you can get these to be automatically coloured by adding two autotext entries that change any diamond to a formated red diamond and similarly with a heart. Essentially use the steps above but instead of !d as the autotext trigger have a normal black diamond as the trigger converting it to a red diamond. Quote Link to comment Share on other sites More sharing options...
Rossoneri Posted March 1, 2010 Report Share Posted March 1, 2010 Above reasons are probably why I'm more willing to use LaTeX instead of Word... Quote Link to comment Share on other sites More sharing options...
Tryggolaf Posted June 7, 2014 Report Share Posted June 7, 2014 Great. Got it to work. Thanks. So to summarize for those that haven't done this. I did the following (easy) steps using Wayne's tips and it doesn't require any macros at all. Note that this was using Microsoft Word 2003. The steps may be different using another version of Word. 1. Go to the Insert menu and select Symbol..2. Insert a Club, Diamond, Heart, and Spade symbol into your document and close the dialog box.3. Highlight your club symbol. Select the font color you would like. I chose green, but you can leave as black if you like. While the symbol is highlighted, go to the Tools menu and select AutoCorrect Options...4. Under the Replace box, I typed !c and the With box was already populated with my green club symbol. Hit the Add button. 5. Repeat steps 3 and 4 for the diamond, heart, and spade symbols. Voila. Anytime you type !c, !d, !h, or !s you will have the colored symbol inserted into your document. For some odd reason, after changing the font color of the hearts symbol to red and keeping the symbol highlighted while opening the AutoCorrect menu (File-Options-Proofing-AutoCorrect Options in Microsoft Word 2010) it still remains black. So the !H-command in Word gives me ♥ instead of ♥ and a related problem I encounter is all the text after the ♥-symbol automatically turning red as well. So it seems like I'm changing the color of the entire text and symbols instead of only the ♥-symbol. Does anyone know how I can fix this problem? Quote Link to comment Share on other sites More sharing options...
fromageGB Posted June 7, 2014 Report Share Posted June 7, 2014 Rather than use an additional character when writing, such as having to type 3!h for example, I find it easiest to have 3h and the other 27 combinations put separately into autocorrect. Now I can just type 1s 2c etc as normal, and it comes out in colour as 1♠ 2♣. (Libreoffice, but I'm sure it would be the same in word.) Quote Link to comment Share on other sites More sharing options...
Cascade Posted June 8, 2014 Report Share Posted June 8, 2014 Rather than use an additional character when writing, such as having to type 3!h for example, I find it easiest to have 3h and the other 27 combinations put separately into autocorrect. Now I can just type 1s 2c etc as normal, and it comes out in colour as 1♠ 2♣. (Libreoffice, but I'm sure it would be the same in word.) If you want to write about play then you will need 52 more or standalone s h d c autocorrects. Quote Link to comment Share on other sites More sharing options...
Cascade Posted June 8, 2014 Report Share Posted June 8, 2014 For some odd reason, after changing the font color of the hearts symbol to red and keeping the symbol highlighted while opening the AutoCorrect menu (File-Options-Proofing-AutoCorrect Options in Microsoft Word 2010) it still remains black. So the !H-command in Word gives me ♥ instead of ♥ and a related problem I encounter is all the text after the ♥-symbol automatically turning red as well. So it seems like I'm changing the color of the entire text and symbols instead of only the ♥-symbol. Does anyone know how I can fix this problem? In the autocorrect options there is a option for plain text or formatted text. Make sure you have selected formatted text. What happens for me is that I select a green club symbol say. I go to the autocorrect options as you describe. I need to fill in the Replace field with !c say and to the right of that is a With field. The With field is initially populated with a black club symbol. Above that field is a radio button with the two options. The default is plain text. When I click the formatted text option the club symbol turns green corresponding to the colour of the text in my document. This seems to work fine and I get !c replaced with my green club symbol. However there are a few quirks. The autocorrect works fine if I type !c followed by a space and !c followed by any punctuation symbol (well I haven't actually tried them all) but it does not seem to work if I follow with an alphanumeric character so !cs or !cx or !cA do not autocorrect. The text after the symbol reverts to the default colour that I am using. However if I subsequently edit text by for example clicking immediately after the club symbol the subsequent text I write is in green. Quote Link to comment Share on other sites More sharing options...
fromageGB Posted June 8, 2014 Report Share Posted June 8, 2014 This seems to work fine and I get !c replaced with my green club symbol. However there are a few quirks. The autocorrect works fine if I type !c followed by a space and !c followed by any punctuation symbol (well I haven't actually tried them all) but it does not seem to work if I follow with an alphanumeric character so !cs or !cx or !cA do not autocorrect.Libreoffice is the same. If I do want to write about about play, such as "play the ♥5" it comes out as "play the ;h5" (yes, I also have ;h for when there there is no preceding number, but use ; rather than ! as it saves using the shift key) so what I do is type "play the ;h 5" which appears as "play the ♥ 5" and then go back to delete the space. I think to do this properly without 52 autocorrect entries would require a macro. I'll experiment. If I follow the the to-be-replaced entry immediately by a punctuation character, interestingly the punctuation itself (as well as any subsequent character) reverts to the default writing colour. What we need is a keyboard with a non-spacing invisible punctuation character! Incidentally, 3;h does not substitute, which is why I have the 28 autocorrects, as I use those frequently. Quote Link to comment Share on other sites More sharing options...
fromageGB Posted June 8, 2014 Report Share Posted June 8, 2014 I have now recorded a libreoffice macro so that I can type something like "bid 3;h and lead the ;c5" and then when the document is completed just run the one macro to convert everything to coloured suit symbols, but I find I don't like this approach. I like the suit symbols and colours to appear as I type, because it is much clearer to read as you are composing. Quote Link to comment Share on other sites More sharing options...
fromageGB Posted June 8, 2014 Report Share Posted June 8, 2014 I have tried echognome's idea of assigning a macro for each coloured symbol to a key, and this is clean as it works with any trailing or leading characters, but I cannot assign them to useful keys. For example, as my keyboard has function keys in groups of four, it would be good to assign F1=spades, F2=hearts, F3=diamonds, F4=clubs. However, while I can do this for F2/3/4 I cannot reassign F1 from its meaning of "help". Similarly there is a reserved key in each of the other blocks of four. While I could use shift in conjunction with an F key, this is not convenient, and I'll stick to my 28 autocorrects. Quote Link to comment Share on other sites More sharing options...
nige1 Posted June 8, 2014 Report Share Posted June 8, 2014 I have tried echognome's idea of assigning a macro for each coloured symbol to a key, and this is clean as it works with any trailing or leading characters, but I cannot assign them to useful keys. For example, as my keyboard has function keys in groups of four, it would be good to assign F1=spades, F2=hearts, F3=diamonds, F4=clubs. However, while I can do this for F2/3/4 I cannot reassign F1 from its meaning of "help". Similarly there is a reserved key in each of the other blocks of four. While I could use shift in conjunction with an F key, this is not convenient, and I'll stick to my 28 autocorrects. With macros similar to Echognome's. I associate ♠, ♥, ♦, and ♣ with ALT/S, ALT/H, ALT/D and ALT/C, respectively. There are enough free ALT keys for all my editing needs. An advantage of defining macros for most repetitive editing tasks is that you can easily import your latest version into each computer on which you use Word. When you leave, you can restore Word to the original state in which you found it. Quote Link to comment Share on other sites More sharing options...
steve2005 Posted June 8, 2014 Report Share Posted June 8, 2014 I have tried echognome's idea of assigning a macro for each coloured symbol to a key, and this is clean as it works with any trailing or leading characters, but I cannot assign them to useful keys. For example, as my keyboard has function keys in groups of four, it would be good to assign F1=spades, F2=hearts, F3=diamonds, F4=clubs. However, while I can do this for F2/3/4 I cannot reassign F1 from its meaning of "help". Similarly there is a reserved key in each of the other blocks of four. While I could use shift in conjunction with an F key, this is not convenient, and I'll stick to my 28 autocorrects. I use the shortcut keys. can set them by clicking on symbol button them shortcut key in word have assigned alt-q to clubs, alt-w to diamonds, alt-e to hearts and alt-r to spades cant do colors that way, autocorrect seems to be the only way but works good with black. QUESTION: what are the standard colors assigned to the various suits? Quote Link to comment Share on other sites More sharing options...
fromageGB Posted June 8, 2014 Report Share Posted June 8, 2014 QUESTION: what are the standard colors assigned to the various suits?You will be using Word, so I probably can't help you as my libreoffice may have different font colours. FWIW I like :clubs = green ; position in the drop-down font colour array 3,1 (along,down starting with 1) html color (html can't speak English) "#008000"diamonds = orange2 ; 6,11 "#dc2300"hearts = chart11 ; 2,14 #ff6633"spades = light blue ; 2,2 "#0000ff"as these to me look the right intensity on both screen and paper, with a clear distinction between the diamond/heart colours. Any answerers with Word ? BTW if you are happy with a double fingered/handed shortcut key action, such as alt-q, then macros do give the colour, as has been described. Edit : html colours added, and these will be the same in all software Quote Link to comment Share on other sites More sharing options...
steve2005 Posted June 8, 2014 Report Share Posted June 8, 2014 using the autocorrect for !c I get a superfluous line. Quote Link to comment Share on other sites More sharing options...
Cascade Posted June 8, 2014 Report Share Posted June 8, 2014 using the autocorrect for !c I get a superfluous line. I would think the most likely reason is that you have an end of line selected when you created the auto correct. Position your cursor before or after the symbol that you want and select one character by using shift and right or left arrow as appropriate is one way to select only one character. Sometimes you need to be careful if the character is at the end of a line or paragraph as word will select the marker. You can get word to show these paragraph markers. Quote Link to comment Share on other sites More sharing options...
steve2005 Posted June 9, 2014 Report Share Posted June 9, 2014 I would think the most likely reason is that you have an end of line selected when you created the auto correct. Position your cursor before or after the symbol that you want and select one character by using shift and right or left arrow as appropriate is one way to select only one character. Sometimes you need to be careful if the character is at the end of a line or paragraph as word will select the marker. You can get word to show these paragraph markers.yes, thought of that, isolated it , still doesn't work when I use plain text is fine but black when I use formatting a line gets added which is useless Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.