KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Automatically have cursor go to the insertion point of newly inserted text
Topic Summary: How to do this with a macro
Created On: 10/23/2006 07:36 PM
Status: Post and Reply
Linear : Threading : Single : Branch
Keyword
 10/23/2006 07:36 PM
User is offline View Users Profile Print this message


bweissglass
Junior Member

Posts: 22
Joined: 10/23/2006

Hi. I use DNS to dictate my medical office notes. I have a lot of text macros that include brackest as markers for the "next" command to bring the cursor to. What I want to do is automatically have cursor go to the insertion point of newly inserted text, so that when I say "next", the cursor will take me there. I don't want to have to scroll, use the "insert after" command, etc. I'd like this to happen automatically and only for text that contains the []. For example, if I say "dragon hypertension", the inital part of the note looks like this:

[name]

[date, say "today's date]

Family Medicine

Subjective: The patient comes in todya for [follow up or new diagnosis] of [his or her] hypertension. This is a [new or chronic] problem.

 etc......

Currently, I have to find the insertion point, one way or the other, before dictating my way through the []'s. Is there a way to have the cursor go to the insertion point of this newly inserted text, before any of the brackets, as part of the macro, so I can simply use the "next" command to dictate my way through the note?

 

Thanks for any help,

Barry Weissglass

 



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


 10/23/2006 09:12 PM
User is offline View Users Profile Print this message


DonnyN
Junior Member

Posts: 9
Joined: 10/12/2006

What's up, Doc?

 Or better yet, what program are you trying to dictate into?

Which DNS are you using, Preferred, Professional, Medical?

Which version number?

 -Donny



-------------------------
Don N
 10/23/2006 11:25 PM
User is offline View Users Profile Print this message

Author Icon
Nastajus
Senior Member

Posts: 321
Joined: 10/02/2006

Donnny,

One of the benefits of this new forum is that information is recorded in the member profile. You just click the poster's name on the left side, and appears a link for that. Then check out the bottom right area. 

Ian 



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

Former primary author of Speechwiki NaturallySpeaking FAQ. 

 10/23/2006 11:37 PM
User is offline View Users Profile Print this message


bweissglass
Junior Member

Posts: 22
Joined: 10/23/2006

Hi. DNS Medical, V. 6.1. Dictating into Word.

 

Thanks,

Barry Weissglass



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


 10/24/2006 08:02 PM
User is offline View Users Profile Print this message


DonnyN
Junior Member

Posts: 9
Joined: 10/12/2006

Barry,

I started with DNS 7.3 professional, so someone else will have to help you with what the Dragon command should look like.

Does your version of Microsoft Word include Visual Basic for applications macros?  If so, it should not be too difficult to write a macro that would select the next occurrence of an open square bracket and then expand the selection to include the closing square bracket.

 The Dragon command would start the Microsoft Word macro. You could then dictate, replacing the selection.  Does that sound like what the doctor ordered?

-Donny



-------------------------
Don N
 10/25/2006 10:20 PM
User is offline View Users Profile Print this message


DonnyN
Junior Member

Posts: 9
Joined: 10/12/2006

Barry,

 here is the macro code for the concept I outlined:

 -Donny

Sub GetSomeBrackets()
'
' GetSomeBrackets Macro
' Macro recorded 10/25/2006
'

    '1) If the macro finds a "[some words]" combination it selects it.
    '  You can then dictate over it.
    '2) If the macro finds a "[" but not a matching "]"
    '  before reaching the MaxWordsIncluded limit, the selection is collapsed
    '  that many words to the right of the found "[".
    '3) If no "[" is found in the document,
    '  the macro moves the selection so many to the right.

 Selection.Collapse (wdCollapseEnd)
 
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "["
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute
   
    Dim TestLimit As Integer
    Dim nwords As Integer
    Dim MaxWordsIncluded As Integer
    Dim RightBracket As Boolean
   
    RightBracket = False
    MaxWordsIncluded = 5
    TestLimit = MaxWordsIncluded + 1  'plus one is for the ending "]"
   
    For nwords = 1 To TestLimit
    Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
    If InStr(Selection.Text, "]" ) > 0 Then
        RightBracket = True
        Exit For
    End If
    Next nwords
   
    If Not RightBracket Then Selection.Collapse (wdCollapseEnd)
   
End Sub



-------------------------
Don N
Statistics
27429 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 2028 on 04/05/2013 at 07:36 PM.
There are currently 157 guests browsing this forum, which makes a total of 158 users using this forum.

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