Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: How to create a TaskPanel like control (Action Pane?) in Office 2003

$
0
0
I solve my problem by creating and displaying a form as UI. It is unable to be attached to the Word interface as the panels, but it works.

Here is the code:
string guid = Guid.NewGuid().ToString();

string wordApplicationCaption = _wordApplication.Caption;

int wordHwnd = 0;
try
{
    _wordApplication.Caption = guid;
    wordHwnd = FindWindow("OpusApp", _wordApplication.ActiveDocument.Name + " - " + guid);
}
finally
{
    _wordApplication.Caption = wordApplicationCaption;
}

NativeWindow wordWindow = new NativeWindow();
wordWindow.AssignHandle(new IntPtr(wordHwnd));

_olderOfficePanelForm = new OlderOfficePaneForm();
_olderOfficePanelForm.Text = _panelTitle;
_olderOfficePanelForm.Show(wordWindow);

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>