Henk Koning was telling us:
Henk Koning nous racontait que :
> Hello Jean-Guy,
>
[quoted text clipped - 8 lines]
>
> Does this explain to you what I mean?
Yes, very clearly, unfortunately, I do not know how it can be done, if it
can be done at all.
From VBA you can turn on or off the outline view or expand/shrink a a
particular level... that's about it. I do not think that there are
properties for recording the state of the view.
May be someone will come along with a clever idea..
Sorry, I can't help you with this particular problem.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Russ - 06 Oct 2007 21:02 GMT
Jean-Guy and Henk Koning,
I think the best you can do is record and store the current state (on or
off) of the toolbar buttons used in Outline view. I'm not that familiar with
toolbar addressing to know how to do that. But it does seem like a
worthwhile macro to have for those people who edit and re-edit the same
document in Outline View.
You must decide when the record-current-Outline-toolbar-button-state macro
is ran. You could have it automatically run whenever a document is closed
from Outline View or manually by starting the macro through a menu, toolbar
button, or shortcut key combination just before closing a document.
Where do you store the button state information?
In current document properties/variables?
In Windows OS Registry?
Etc.
How/when do you restore to toolbar to stored-past state?
Whenever a document is viewed in Outline view?
Whenever a document is opened that has a document variable/property for
outline-view-toolbar-state?
Manually through another menu, toolbar button, or shortcut key combination?
Etc.
You can through VBA use pseudocode like this to change the toolbar buttons
back to stored values:
Sub RestoreToolbarSettings()
ActiveWindow.ActivePane.View.Type = wdOutlineView
ActiveWindow.View.ShowAllHeadings
If documentvariable or windowsregistry has heading1 set then
ActiveWindow.View.ShowHeading 1
End If
End Sub
> Henk Koning was telling us:
> Henk Koning nous racontait que :
[quoted text clipped - 22 lines]
>
> Sorry, I can't help you with this particular problem.

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Russ - 06 Oct 2007 21:34 GMT
Another useful thing to store with the toolbar settings would be the current
selection or insertion point before closing; and restore or bring that back
into view when the document is re-edited.
> Jean-Guy and Henk Koning,
> I think the best you can do is record and store the current state (on or
[quoted text clipped - 56 lines]
>>
>> Sorry, I can't help you with this particular problem.

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Russ - 06 Oct 2007 22:15 GMT
I afraid I didn't notice until now that the main problem is the expand and
collapse settings and not just the outline level settings. The expand and
collapse settings are more difficult to detect. You'd have to know what
outline ranges are currently visible on screen. I don't know of a way to
detect that through VBA code.
> Another useful thing to store with the toolbar settings would be the current
> selection or insertion point before closing; and restore or bring that back
[quoted text clipped - 60 lines]
>>>
>>> Sorry, I can't help you with this particular problem.

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Russ - 06 Oct 2007 22:29 GMT
Henk Koning,
I just noticed that if you save a document while it is in Outline View,
close it, and reopen the document; then the document **does** reappear just
as you saved it (with things collapsed just like before saving). So is that
all you needed? Just save and close while still in Outline View.
> I afraid I didn't notice until now that the main problem is the expand and
> collapse settings and not just the outline level settings. The expand and
[quoted text clipped - 66 lines]
>>>>
>>>> Sorry, I can't help you with this particular problem.

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Russ - 06 Oct 2007 22:54 GMT
Henk Koning,
After more testing, I discovered bug/feature on my Mac 2004 that it only
records the current expand collapse settings when you save it originally or
resave it under a new filename. It might be a feature if you consider being
able to open different versions of the same document that look different
when viewed in Outline View.
Therefore, you may have to save the document while in Outline view, under a
new name, when you want to return to the last expand and collapse view.
> Henk Koning,
> I just noticed that if you save a document while it is in Outline View,
[quoted text clipped - 73 lines]
>>>>>
>>>>> Sorry, I can't help you with this particular problem.

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID