Results 1 to 1 of 1
2001-09-30, 23:01 #1
- Join Date
- Dec 2002
- Canberra, Australian Capital Territory, Australia
- Thanked 0 Times in 0 Posts
Manipulating the Word 2002 task pane (Word 2002)
I have tried to write a procedure to preserve the state of the Word Task pane when a new blank document is created.
The task pane is a dogs breakfast in the Word object model, no disrespect to dogs intended.
It appears as an item in the CommandBars collection where it's visiblilty can be set. However it is not really a commandbar since it does not have most of the properties of a command bar.
There is also a TaskPanes Collection which has 5 items. But the 'New document' pane is not one of these! Also there are 8 types of pane in the user interface drop-down box.
I cannot find a what is wrong with the following code which gets a run-time error when attempting to set the task pane to visible.
Dim blnPaneVisible As Boolean
Dim docCurrent As Document
Dim docNew As Document
Set docCurrent = ActiveDocument
blnPaneVisible = docCurrent.CommandBars("Task Pane").Visible
Set docNew = Documents.Add(DocumentType:=wdNewBlankDocument)