Create my blog Sidebar--word 2007 advanced Applications

Source: Internet
Author: User

Create my blog Sidebar--word 2007 advanced Applications

I don't know how I can do that, but now with VSTO, you can use the techniques of Windows Forms that you've learned before, and in fact, such a sidebar is a user control. Now, let's develop the "my Blog" sidebar. First, add a user control named Myblogsusercontrol to the project, and then drag and drop the column control over it:

Cbxblogs: For displaying a list of blogs

Btnviewblog: Open the home page of the selected blog in Internet Explorer

Lbxrecentposts: List the most recently posted posts for selected blogs

Btnviewpost: Open a page of selected posts in Internet Explorer

Lbxdrafts: Lists posts that are not posted locally

Btnopendraft: Opens selected post drafts in Word 2007

Myblogsusercontrol is designed in Visual Studio as shown in the following illustration:

  

Figure 1

The next step is to embed the Myblogsusercontrol into Word 2007, and the easiest way to do that is to load the control in a custom Task pane when the plug-in is started. Back to ThisAddIn.cs, we can see that Visual studio has handler the event for the startup event for our plug-in:

[Ad: Create my blog sidebar &m ...]

So, we just need to insert the following code inside the method:

  

As an extension of the application level (Application-level), Office 2007 introduced the concept of custom task pane, however, using the custom task pane directly through Office PIAs was cumbersome, so VSTO provides a simplified solution, just as the code #02所示的那样.

Value-added service Area

Creating Custom Task Panes Using Visual Studio Tools for Office,robert Green

Creating Custom Task Panes in the 2007 Office System,mark O ' Hara and Frank Rice

Of course, don't forget to refer to the VSTO namespace:

  

Test mental Area

How many usages are there in the Using keyword? What are they, respectively?

Now look at the effect of the operation:

  

Figure 2

So far, the "my Blog" sidebar is just an "empty shell", and the next step is to implement the logic inside.

The next chapter will introduce you to populate my blog sidebar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.