It's indeed easy to do.
You don't even have to use GREP, you can use regular text search/replace query.
First, create your character style for bold. (Let's call it "CBold")
Then, create your paragraph style, with your desired settings (Let's call it "PReg")
Finally, click on the "specify attributes to find" icon, search for "Bold" and replace by both character and paragraph styles previously defined:
That will do the job.
Please note this will "erase" all text attributes (such as italic...) in your paragraph.
Also, it will apply changes to all paragraph if no style is specified in searching options: including titles i.e.
So, be careful when using this method...
I am trying to make a paragraph style that will apply a character style to the bold text using GREP.
Is there a GREP code for that (to only apply the character style to the bold and nothing else)?
No, there is not. GREP itself is not concerned with text attributes (bold, italic, superscript), and so there are no codes for it.
A GREP Style can only be used to apply a character style to the characters that its GREP expression match.
I know that this is easily accomplished in the find/change dialog box, but I am asking about the paragraph style dialog box in the GREP section.
Any help would be greatly appreciated.
No - the Paragraph Style dialog box allows you to apply a premade character style to some text using GREP code.
GREP code would be something like
Would find a string of digits that are togethere without any spaces or commas, basically it would find, 1 or 11 or 111 or 1111 etc. but not 1,000 or 10,000 it would only find the 1 skip the , then 000
You'd end up with 1,000 without the comma being emboldened.
In short - no you cannot find Character styles using Grep Styles.
As Vinny38 points out you can do this in the Find/Change and you knew this already.
I suggest you should have a all your text with the proper character styles applied - and this little script does that just - creates/applies character styles throughout your document.
How to install and use scripts