Word/VBA hangs by List-Formating

  • Thread starter Alexander Achenbach
  • Start date
A

Alexander Achenbach

Dear all,

I formated a paragraph as a list-item via VBA:
ListGalleries(wdNumberGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplate
ListTemplate:=ListGalleries( _
wdNumberGallery).ListTemplates(1), ContinuePreviousList:=True,
ApplyTo:= _
wdListApplyToWholeList,
DefaultListBehavior:=wdWord10ListBehavior

This runs in a pseudo-loop for different parts of the document. When I run
it with debug-mode all is fine (even when I just Step over some commands and
then run the rest of the entire program).
But, when the program runs "unattended", Word suddenly hangs (CPU=100%) and
it is not possible to stop it, except via task-manager (no Ctrl-Break).

Any idea?
 
S

Simon Lloyd

Whats said:
Dear all

I formated a paragraph as a list-item via VBA
ListGalleries(wdNumberGallery).ListTemplates(1).Name = "
Selection.Range.ListFormat.ApplyListTemplat
ListTemplate:=ListGalleries(
wdNumberGallery).ListTemplates(1), ContinuePreviousList:=True
ApplyTo:=
wdListApplyToWholeList
DefaultListBehavior:=wdWord10ListBehavio

This runs in a pseudo-loop for different parts of the document. When
ru
it with debug-mode all is fine (even when I just Step over som
commands an
then run the rest of the entire program)
But, when the program runs "unattended", Word suddenly hangs (CPU=100%
an
it is not possible to stop it, except via task-manager (no Ctrl-Break)

Any idea

--
Simon Lloy

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top