Using Word 2002, I want to set up a macro that involves several repetitive
keystrokes and clicks and includes opening a dialogue box, and should end
with the cursor in a field within that box.
From that point, the user would enter whatever was appropriate.
Trouble is, I cannot get at the Stop button on the macro toolbar whilst the
dialogue box is open, so I am not able to stop recording and save the macro.
How can I do this??!!

Re: Record a macro that ends with a dialogue box open? by Doug

Doug
Thu Oct 20 12:39:24 CDT 2005

There are some things that you cannot do with the macro recorder and you
will have to add the command to the code generated by the recorder.

The command that you will need to add is:

Dialogs(wdDialog[dialog name]).Show

You will need the replace the square brackets and their content with name of
the appropriate dialog.

Probably best if you tell us exactly what you are trying to do (in detail)
as there are a few tricks that you may need to use.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"CW" <CW@discussions.microsoft.com> wrote in message
news:EC1AC76C-5EB0-4E26-80EE-59E86AB1C36B@microsoft.com...
> Using Word 2002, I want to set up a macro that involves several repetitive
> keystrokes and clicks and includes opening a dialogue box, and should end
> with the cursor in a field within that box.
> From that point, the user would enter whatever was appropriate.
> Trouble is, I cannot get at the Stop button on the macro toolbar whilst
> the
> dialogue box is open, so I am not able to stop recording and save the
> macro.
> How can I do this??!!



Re: Record a macro that ends with a dialogue box open? by CW

CW
Thu Oct 20 18:55:02 CDT 2005

Thanks, Doug, that looks very promising.
This is what I need to do - we have several tens of mailmerge docs to create
and some to update, each with up to 20 fields. It's a real pain to go through
the process every time up to the point where you specify each mergefield, so
I'd like to have a macro to run it up to that point, which is something like
this (sorry but I'm not at the office now and have a different version at
home but from memory the steps are pretty much as follows:
Start the macro recording
Click on Tools
Click on Mailmerge
(This opens a dialogue box)
Click on Categories, select Mailmerge
Click on Mergefield in the list displayed
Cursor now goes to the box where the mergefield name can be entered.
(THIS is the point where I would like to STOP recording and save the actions
to date, so that we can then input whatever the specific individual
mergefield details happen to be, for that field within that document. But I
cannot, as the macro toolbar cannot be accessed while the dialogue box is
open, and if I close it to get at the toolbar it is completely self-defeating
as I then lose the input field for the mergefield name!).
Hope that clarifies my objectives and I really appreciate your help - it
could save us a lot of time and frustration!!

"Doug Robbins - Word MVP" wrote:

> There are some things that you cannot do with the macro recorder and you
> will have to add the command to the code generated by the recorder.
>
> The command that you will need to add is:
>
> Dialogs(wdDialog[dialog name]).Show
>
> You will need the replace the square brackets and their content with name of
> the appropriate dialog.
>
> Probably best if you tell us exactly what you are trying to do (in detail)
> as there are a few tricks that you may need to use.
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "CW" <CW@discussions.microsoft.com> wrote in message
> news:EC1AC76C-5EB0-4E26-80EE-59E86AB1C36B@microsoft.com...
> > Using Word 2002, I want to set up a macro that involves several repetitive
> > keystrokes and clicks and includes opening a dialogue box, and should end
> > with the cursor in a field within that box.
> > From that point, the user would enter whatever was appropriate.
> > Trouble is, I cannot get at the Stop button on the macro toolbar whilst
> > the
> > dialogue box is open, so I am not able to stop recording and save the
> > macro.
> > How can I do this??!!
>
>
>

Re: Record a macro that ends with a dialogue box open? by Doug

Doug
Thu Oct 20 23:21:51 CDT 2005

Sorry, it is still not clear what you really need to do, but it sounds a bit
like you may be re-inventing a wheel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"CW" <CW@discussions.microsoft.com> wrote in message
news:8009EAC1-E804-4631-99F2-7506DAE6A011@microsoft.com...
> Thanks, Doug, that looks very promising.
> This is what I need to do - we have several tens of mailmerge docs to
> create
> and some to update, each with up to 20 fields. It's a real pain to go
> through
> the process every time up to the point where you specify each mergefield,
> so
> I'd like to have a macro to run it up to that point, which is something
> like
> this (sorry but I'm not at the office now and have a different version at
> home but from memory the steps are pretty much as follows:
> Start the macro recording
> Click on Tools
> Click on Mailmerge
> (This opens a dialogue box)
> Click on Categories, select Mailmerge
> Click on Mergefield in the list displayed
> Cursor now goes to the box where the mergefield name can be entered.
> (THIS is the point where I would like to STOP recording and save the
> actions
> to date, so that we can then input whatever the specific individual
> mergefield details happen to be, for that field within that document. But
> I
> cannot, as the macro toolbar cannot be accessed while the dialogue box is
> open, and if I close it to get at the toolbar it is completely
> self-defeating
> as I then lose the input field for the mergefield name!).
> Hope that clarifies my objectives and I really appreciate your help - it
> could save us a lot of time and frustration!!
>
> "Doug Robbins - Word MVP" wrote:
>
>> There are some things that you cannot do with the macro recorder and you
>> will have to add the command to the code generated by the recorder.
>>
>> The command that you will need to add is:
>>
>> Dialogs(wdDialog[dialog name]).Show
>>
>> You will need the replace the square brackets and their content with name
>> of
>> the appropriate dialog.
>>
>> Probably best if you tell us exactly what you are trying to do (in
>> detail)
>> as there are a few tricks that you may need to use.
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "CW" <CW@discussions.microsoft.com> wrote in message
>> news:EC1AC76C-5EB0-4E26-80EE-59E86AB1C36B@microsoft.com...
>> > Using Word 2002, I want to set up a macro that involves several
>> > repetitive
>> > keystrokes and clicks and includes opening a dialogue box, and should
>> > end
>> > with the cursor in a field within that box.
>> > From that point, the user would enter whatever was appropriate.
>> > Trouble is, I cannot get at the Stop button on the macro toolbar whilst
>> > the
>> > dialogue box is open, so I am not able to stop recording and save the
>> > macro.
>> > How can I do this??!!
>>
>>
>>