KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Need custom command for Cap That and Bold That
Topic Summary:
Created On: 05/24/2022 08:31 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Need custom command for Cap That and Bold That   - android94301 - 05/24/2022 08:31 PM  
 Need custom command for Cap That and Bold That   - dilligence - 05/24/2022 09:57 PM  
 Need custom command for Cap That and Bold That   - android94301 - 05/24/2022 10:32 PM  
 Need custom command for Cap That and Bold That   - Alan Cantor - 05/24/2022 11:48 PM  
Keyword
 05/24/2022 08:31 PM
User is offline View Users Profile Print this message

Author Icon
android94301
Power Member

Posts: 61
Joined: 01/13/2015

I am wondering if someone can help me to craft a custom command for Dragon or for Knowbrainer that would take a sentence and capitalize it and bold it. 

 

I would like to be able to highlight a sentence and issue one command that would do this. 

 

Thanks. 

 05/24/2022 09:57 PM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1540
Joined: 08/16/2010

This fast DVC HeardWord command should work. Simply import it into your Dragon® Command Browser (I attached it):

 

HeardWord "select","line"

HeardWord "\cap","that"

HeardWord "bold","that"

 

Needless to say, when you utter this command your cursor should be in the line you want to capitalize and bold. And of course this command will only work with (RichText) applications that support formatting (like DragonPad, WordPad, DB Advanced etc.).

 

If you want to learn more about creating fast DVC voice commands like this one, check out The Easy Guide to Dragon® Scripting






-------------------------

https://speechproductivity.eu


Turbocharge your Dragon® productivity with 40 Power Addons



 05/24/2022 10:32 PM
User is offline View Users Profile Print this message

Author Icon
android94301
Power Member

Posts: 61
Joined: 01/13/2015

Nice, works perfectly. Thanks. 

 05/24/2022 11:48 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4342
Joined: 12/08/2007

If you're OK with a custom command working only in Word, try this. This Advanced Scripting command should run almost instantly. You won't need to select the sentence, as the command does it for you.

Sub Main ()
With Selection
    .Expand Unit:=wdSentence
    .Font.Bold = True
End With

    HeardWord "\cap", "that"
End Sub

You'll need to set a reference for this command to "Microsoft Word XX.0 Object Library (Y.Z)"

The values of X, Y, and Z vary with different versions of Word.

 

(Edit: I updated the code because the original code I posted didn't quite work!)



Statistics
32321 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 497 guests browsing this forum, which makes a total of 497 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.