Question: I'm using the following vba to simply click on a button and open a command prompt window, however when I do so, it opens it up in onenote instead of locally. Why is this the default behavior? I was under the impression shell opened it up locally.

```
Private Sub CMD_PW2_Click()

Set oShell = CreateObject("Shell.Application")
oShell.ShellExecute "cmd.exe"

End Sub

```

The result of the above is that it opens up CMD pointing from onenote and not local C:\

Answer: 
Im suprised to see regex used for this due to it causing unneeded complexity sometimes. Could something like this work?

```py
def extract_next_words(sentence):
    # split the sentence into words
    words = sentence.split()

    # find the index of "our"
    index = words.index("our")

    # extract the next 4 words
    next_words = words[index+1:index+5]

    # join the words into a string
    return " ".join(next_words)

```
Here is the generic code for finding the n number of words after a specific 'x' word in the string. It also accounts for multiple occurrences of 'x' as well as for non-occurrence.

```
def find_n_word_after_x(in_str, x, n):
    in_str_wrds = in_str.strip().split()
    x = x.strip()
    if x in in_str_wrds:
        out_lst = []
        for i, i_val in enumerate(in_str_wrds):
            if i_val == x:
                if i+n < len(in_str_wrds):
                    out_str = in_str_wrds[i+1:i+1+n]
                    out_lst.append(" ".join(out_str))
        return out_lst
    else:
        return []
str1 = "our w1 w2 w3 w4 w5 w6"
str2 = "our w1 w2 our w3 w4 w5 w6"
str3 = "w1 w2 w3 w4 our w5 w6"
str4 = "w1"

print(find_n_word_after_x(str1, 'our', 4))
print(find_n_word_after_x(str2, 'our', 4))
print(find_n_word_after_x(str3, 'our', 4))
print(find_n_word_after_x(str4, 'our', 4))

```

Generated Output:

```
['w1 w2 w3 w4']
['w1 w2 our w3', 'w3 w4 w5 w6']
[]
[]

```