Groups > WordPerfect Office > WordPerfect 12 > Re: Macro command to close Generate dialogue




Re: Macro command to close Generate dialogue

Re: Macro command to close Generate dialogue
Sat, 29 Mar 2008 10:21:14 -070
You can also use a small macro to mark /selected/ text for inclusion in 
a Table of Contents /without/ using the Reference Tools dialog as your 
macro apparently does.

See the footnote on this page: http://wptoolbox.com/tips/MarkTOC.html#1

The other material on that page (above the footnote) might be of 
interest, since it discusses creating custom /styles/ that already are 
(internally) marked with the appropriate TOC codes. All you would need 
to do is apply the style(s) to a document heading and it will do the 
same thing as WP's built-in Heading styles: format the heading and apply 
TOC markers.

In either of the above, you probably want to generate the TOC after all 
items have been marked for inclusion in the TOC. Generating the TOC 
immediately after each and every item is marked is time-consuming and 
might lead to document corruption. (No hard evidence for this, just my 
opinion.)

Barry

-------------------------
Toolbox for WordPerfect -
tips, macros, and more at
http://wptoolbox.com
-------------------------



d381e wrote:
> 
> I have a macro that marks text for the table of contents and then 
> generates the table. However, I cannot seem to get it to close the 
> dialog box for Reference Tools, and I don't see a command in the command 
> list that looks like it would do this. Is there another way to 
> accomplish the same thing? Thanks.
> 
> David
> 
Post Reply
Re: Macro command to close Generate dialogue
Sat, 29 Mar 2008 10:30:06 -050
SendKeys("")

or
SendKeys("{Alt+F4}")

Your focus has to be on the dialog for the keys to work.
Post Reply
Macro command to close Generate dialogue
Sat, 29 Mar 2008 11:19:11 -040
I have a macro that marks text for the table of contents and then 
generates the table. However, I cannot seem to get it to close the 
dialog box for Reference Tools, and I don't see a command in the command 
list that looks like it would do this. Is there another way to 
accomplish the same thing? Thanks.

David
Post Reply
Re: Macro command to close Generate dialogue
Sat, 29 Mar 2008 13:40:20 -040
Thanks. For some reason, SendKeys("") didn't work, but 
SendKeys("{Alt+F4}") works fine.

David

Kenneth Hobson wrote:
> 
> SendKeys("")
> 
> or
> SendKeys("{Alt+F4}")
> 
> Your focus has to be on the dialog for the keys to work.
> 
Post Reply
Re: Macro command to close Generate dialogue
Sat, 29 Mar 2008 14:00:20 -040
I'm going to hang on to this for future reference as well. My macro is 
already marking specific text for the Table Of Contents and has worked 
for some time. It was the new (at least since WP7) remain-in-place 
dialogue box that became annoying. I'll look at the style approach if I 
rework it, or have to do something similar. Thanks.

David

Barry MacDonnell wrote:
> 
> You can also use a small macro to mark /selected/ text for inclusion in 
> a Table of Contents /without/ using the Reference Tools dialog as your 
> macro apparently does.
> 
> See the footnote on this page: http://wptoolbox.com/tips/MarkTOC.html#1
> 
> The other material on that page (above the footnote) might be of 
> interest, since it discusses creating custom /styles/ that already are 
> (internally) marked with the appropriate TOC codes. All you would need 
> to do is apply the style(s) to a document heading and it will do the 
> same thing as WP's built-in Heading styles: format the heading and apply 
> TOC markers.
> 
> In either of the above, you probably want to generate the TOC after all 
> items have been marked for inclusion in the TOC. Generating the TOC 
> immediately after each and every item is marked is time-consuming and 
> might lead to document corruption. (No hard evidence for this, just my 
> opinion.)
> 
> Barry
> 
> -------------------------
> Toolbox for WordPerfect -
> tips, macros, and more at
> http://wptoolbox.com
> -------------------------
> 
> 
> 
> d381e wrote:
>>
>> I have a macro that marks text for the table of contents and then 
>> generates the table. However, I cannot seem to get it to close the 
>> dialog box for Reference Tools, and I don't see a command in the 
>> command list that looks like it would do this. Is there another way to

>> accomplish the same thing? Thanks.
>>
>> David
>>
> 
Post Reply
about | contact