<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Mike Fried's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mike_frieds_blog/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/feed.xml</link>
    <description>A semi-weekly collection of tips, tricks, and details about PowerPoint and Development.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:25:33 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Some opinions on the computer industry</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/some-opinions-on-the-computer-industry</link>
      <pubDate>Sun, 04 May 2008 13:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2008/05/04/some-opinions-on-the-computer-industry/</guid>
      <description><![CDATA[First of all, a disclaimer: These words&nbsp;are the opinion of Mike Fried,&nbsp;a software engineer...]]></description>
      <content:encoded><![CDATA[<P>First of all, a disclaimer: These words&nbsp;are the opinion of Mike Fried,&nbsp;a software engineer and internet user,&nbsp;and not the official&nbsp;statements of Microsoft. I don't speak for Microsoft. I speak for myself. However, I think I have an interesting perspective to offer. This posting is provided&nbsp;AS IS with no warranties and confers no rights.</P>
<P>Now that we're clear on this, I was reading the "news" lately. The tagline: "<A class="" title="Google CEO Eric Schmidt: Social networks are still too closed" href="http://www.news.com/8301-13953_3-9933627-80.html?tag=nefd.only" mce_href="http://www.news.com/8301-13953_3-9933627-80.html?tag=nefd.only">Google CEO Eric Schmidt: Social networks are still too closed</A>". The comment of Google's CEO was that, "If it's not searchable by Google, it's not open, and open is best for the consumer,". Speaking <STRONG>as a consumer</STRONG>, I strongly disagree. I jumped on the social network bandwagon and started accumulating "friends" on Friendster, MySpace, Facebook, <A class="" title="Geni &quot;Everyone's related&quot;" href="http://www.geni.com/" mce_href="http://www.geni.com/">Geni</A>, and Linked in. If Google were suddenly given all this social networking data to crawl, without the end users' permission (i.e. my/your personal data without my/your permission), then users like me would be up in arms with Friendster, Facebook, etc. <STRONG>I don't want my private information searchable.</STRONG> (Why don't I keep my private information off the internet in general? Because I like to be able to share it with my friends, and these sites provide a mechanism for me to accept/reject who my friends are/who can see it.) I don't trust people across networks. Moreover, the social networking aspects of Friendster which mostly involved being able to introduce yourself (or your friends) to potential dates through mutual friends conflict sharply with the social networking aspects of Linked in, which involves being able to get/give referrals to jobs or learn more/provide information&nbsp;about companies. I might have a couple family members in my Facebook, and I might have a few family, old school buddies, and friends in Linked in, but Facebook is a social network tool/MMORPG, and MySpace is where I go when my latest rocker friend releases a new blog post or album.</P>
<P>Google's CEO&nbsp;is making the complaint that <STRONG>Facebook</STRONG> et all&nbsp;are closed, and I think they are rightly so. Geni being closed is probably off their radar, because it doesn't have nearly enough market share. Anyone who has used Facebook and a couple other social networks knows that what makes Facebook interesting is that the people who run it understand <STRONG>why</STRONG> we use social networks. They have the <STRONG>best</STRONG> photo sharing experience, with the ability to tag people in pictures. They have the <STRONG>best</STRONG> applications. They are the <STRONG>fastest growing/largest</STRONG> social network because <STRONG>they are better</STRONG> than the rest. And part of what makes any social network useful is the fact that the <STRONG>private user data is locked</STRONG>.&nbsp;Also, <STRONG>Facebook simply has the right features. </STRONG>They let you log in and keep a cookie to indefinately keep yourself connected. Others epic fail here. For example:&nbsp;when MySpace emails me that my friend posted a new blog and I click the link, I get sent to a rejection&nbsp;web page that requires me to log in, even though I've checked the box to keep me logged in forever and am already logged in right now in another web browser window.&nbsp;If I could take "my data" elsewhere, <STRONG>how would I do it, and where would I take it?</STRONG> Seriously, the only way to do it would be to join another social network and try to re-create my network there. Well, the different network would have different sets of experiences and have a different purpose, and not all my friends in one network really belong in the other. Not only that, but what makes&nbsp;Facebook a MMORPG is that people gather there and play, even if that is only "twittering" through it.&nbsp;Facebook recently added IM features through the web page.&nbsp;The way that Facebook is expanding functionality and adding features like IM through the page is quickly making it more of a "life portal". The interesting thing about social networks is that they come and they go. There was a social network in 1997 called <A class="" title="SixDegrees on Wikipedia" href="http://en.wikipedia.org/wiki/SixDegrees.com" mce_href="http://en.wikipedia.org/wiki/SixDegrees.com">SixDegrees</A>. I joined it. It went away. What keeps social networks thriving? Activity. I suspect that Geni and Friendster will eventually fail (though Geni might survive).&nbsp;Facebook is a moving target. They have lots of features, and they keep adding new ones, like the new IM features at the bottom of the pages.</P>
<P>The question that is on my mind is: <STRONG>If Google's platform doesn't add value to Facebook, then why should Facebook consider it?</STRONG></P>
<P>What Google is trying to do is basically become like the <A class="" title="Cerulean Studios" href="http://www.ceruleanstudios.com/" mce_href="http://www.ceruleanstudios.com/">Trillian</A> of social networks - the binding factor. Trillian is a remarkably good IM client because it&nbsp;goes deeper into features than just IM. An IM client, however&nbsp;is not a social network platform.&nbsp;The problem&nbsp;which should be obvious to any&nbsp;developer&nbsp;who uses more than 2 social networks is that the features of each network are similar and yet vastly different. You get the least common denominator in a platform when you bridge multiple platforms. This is ever so obvious if you try to write a program to collect the data from all your social networking sites. You will quickly discover how different each site is. The data in each is on their server in a form which gets rendered into human-readable content. The scripts building that content are subject to change at any time, and so the "protocol" which these web pages are using can change as they are human interfaces, not software contracts.</P>
<P>So basically, lets say that Facebook pioneered this space of social networking apps, and it's at version 3 right now, and Google is in Beta, but Google is trying to get everyone to embrace their platform. What must Google do to make OpenSocial succeed? Well, they must get Facebook onboard. Really? Yes. Facebook is the winning network both for the number of users as well as its "richness" (and I hate that word, but it seems to fit well here).&nbsp;I claim it is in Facebook's best interest to <STRONG>not join OpenSocial</STRONG>. It would be wonderful in theory to bridge the gap between all social networks, but in reality, I like that Facebook is the place I go to to play Texas Hold'em poker and get twitter-like status updates on friends. I like that Geni is the place I go to if I want to look at my family tree. I like that my friends who are in bands put their&nbsp;stuff up on MySpace where I can listen to their music. I like to be able to browse the set of people I went to school with on Friendster by School (I'm not paying classmates.com for this information, when Facebook gives it to me for free). But most of all, I like that <STRONG>most of my friends use Facebook</STRONG>, because Facebook has the best features. It's fun to play "Oregon Trail" with friends or compare movies or political opinions. It's nice to see people's photos and have embedded youtube videos on a friend's wall. Most of my friends are also on one or two other social networking sites, but in my experience Facebook is the one we all update.</P>
<P>So my analysis goes like this: The only way for Google to "win this battle with Facebook" for social networking application development platform is if Facebook has something to lose if they don't join Google. Since Facebook has a lead in terms of time, and is the leader in terms of platform functionality, and the leader in terms of users, I don't see Facebook joining OpenSocial. <STRONG>Can OpenSocial succeed without Facebook?</STRONG>&nbsp;Sure. It's possible.&nbsp;Do I think that Facebook will be the winner in the Social Networking space? Maybe. Maybe not. It is the clear winner <STRONG>at the moment</STRONG>. I have some issues with each social networking site that I am a member of, but "data portability" can be solved at the client side by a developer like myself writing a browser plug-in to harvest, extract, and analyze the data during visits (i.e. copy/paste). Of course, the data&nbsp;extracted is only as valid as the last time it was updated. If I leave Facebook, I miss the opportunity to see friend's photos and twitter-like status updates. Also, crawling is against the rules, and as <A class="" title="Scoble gets kicked off Facebook" href="http://scobleizer.com/2008/01/03/ive-been-kicked-off-of-facebook/" mce_href="http://scobleizer.com/2008/01/03/ive-been-kicked-off-of-facebook/">Scoble discovered</A>, lands your account disabled, but integrating into a web browser and extracting the data as the end user visits can certainly work across networks without detection (still violating the ToS/EULA), but you&nbsp;only get data you've already seen (basically acting as a web cache), and it gets stale as you don't visit. So Facebook has toys to make you come back and visit, and as long as you keep coming back and don't violate their agreement, you bet it will stay.</P>
<P>Will someone build a better social network than Facebook? It's certainly possible, but I doubt it. Overall, I think that Microsoft investing in Facebook was one of the best moves that the company has&nbsp;made in recent memory.</P>]]></content:encoded>
    </item>
    <item>
      <title>A shoutout to a good blog.</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/a-shoutout-to-a-good-blog</link>
      <pubDate>Sat, 03 May 2008 04:30:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2008/05/03/a-shoutout-to-a-good-blog/</guid>
      <description><![CDATA[I have been reading I.M. Wright's writings for a while now, and just recently received an email...]]></description>
      <content:encoded><![CDATA[I have been reading I.M. Wright's writings for a while now, and just recently received an email alerting me that his writings are and have been up on the web for all to see. Go <A class="" title="Eric Brechner's Blog" href="http://blogs.msdn.com/eric_brechner/default.aspx" mce_href="http://blogs.msdn.com/eric_brechner/default.aspx">here</A> for good reads about software development.]]></content:encoded>
    </item>
    <item>
      <title>Milestones, Cuts, and what you aren't going to ship.</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/milestones-cuts-and-what-you-arent-going-to-ship</link>
      <pubDate>Tue, 23 Oct 2007 15:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2007/10/23/milestones-cuts-and-what-you-arent-going-to-ship/</guid>
      <description><![CDATA[At Microsoft, there is a mantra&nbsp;repeated&nbsp;often&nbsp;by&nbsp;people who have been at the...]]></description>
      <content:encoded><![CDATA[<P>At Microsoft, there is a mantra&nbsp;repeated&nbsp;often&nbsp;by&nbsp;people who have been at the company a long time: "Shipping is a feature."</P>
<P>Like many&nbsp;things in life, what you don't say is often as&nbsp;or more important than what you do say, and there&nbsp;are positive sides to this and negative sides to this mantra. In line with my last post (9 months ago - I know), I wanted to go down into the rabbit hole and take you with me on a tour of some of the indicators that you are on a team which knows how to ship. There is a corollary to "shipping is a feature", and that is:</P>
<P><STRONG>You don't know what you are shipping unless you know what you are not shipping.</STRONG></P>
<P>When you build a product, you&nbsp;have a limited number of resources and a limited amount of time from the moment that you formulate your plan to the time you sign off on the gold master to give to marketing and sell to the customer. Building a product suite as large as Office is done much the same way that building a smaller product is done: in milestones. The next several paragraphs explain how the team which builds Office works together to ensure that the right stuff gets into the final product from this perspective and how cuts happen throughout the development cycle.</P>
<P>Microsoft has three major divisions of labor in the "development team". These divisions of labor have layers of management reporting to one overall manager (General Manager, PUM, and VP are typical titles), and each of the "disciplines" has peak amounts of work in the beginning ("Program Manager"), middle ("Developer"), and end ("Tester"). This is generally speaking - employees work all the time during the cycle doing different tasks. In general, the PM&nbsp;outlines what&nbsp;the&nbsp;product needs to do, the Developer implements the product/features, and the Tester makes work for the PM/Dev when the product doesn't work as expected. The PM is also tasked with balancing the work, prioritizing features in the schedule and bugs in the **bug database.</P>
<P>In the beginning of the milestone, Program Managers are busy planning, producing, refining, and reviewing&nbsp;specs. Developmers&nbsp;are busy estimating work/entering estimates on work items into the schedule databases, building prototypes to answer important design and implementation questions, fixing up bugs from previous milestones or product releases (service pack and hotfix work included), and reviewing specs. Testers&nbsp;are busy drawing up test plans, testing bug fixes from development, writing more automated tests&nbsp;for previous feature work, learning&nbsp;the latest technology and methods,&nbsp;etc. Before the coding part of the milestone starts, the team meets and cuts features based on the estimates, priorities,&nbsp;and plans to fit the schedule.</P>
<P>In the middle of the milestone, Program Managers are prioritizing bugs, investigating cross-team issues, and taking care of managing the work done by teams such as localization/globalization, documentation, design, etc. Developers are writing code and tracking progress in bug databases and schedule databases. Testers are busy testing, writing automation, and filing bugs against their developers, keeping developers honest about what they actually accomplished and tracking unfinished or unanticipated work (in the bug database).</P>
<P>In the end of the milestone, Program Managers are prioritizing/triaging/cutting work, making tradeoffs for what bugs need potentially destabilizing&nbsp;changes and making decisions&nbsp;about how to deal with bugs which are&nbsp;less likely to affect the customer - these become documented and fall into categories - won't fix (ever)&nbsp;or postponed (maybe to the next milestone if there is one, maybe to a service pack if customers actually run into the problem and there is no readily available workaround, maybe to a next release, etc). Developers are fixing the oldest and/or worst bugs. Testers are preventing developers from checking in fixes that don't meet increasingly "higher standards" and filing bugs directly to Program Managers instead of Developers (for prioritization and pre-triage). They are also running test pass after test pass - security, performace, legacy, accessibility, localization, stress testing, etc.</P>
<P>The final stage of the milestone/product&nbsp;cycle&nbsp;is a code freeze&nbsp;which includes a triage process where the source control for the project is forked and only the very worst bugs get fixed/checked into the deliverable code. Once this stage is entered, all non-milestone blocking bugs will be postponed to the next milestone of the project. The final milestone is like an extra end to a normal milestone except that&nbsp;"The quality bar is raised" until&nbsp;only real show stoppers get fixed - the kind which would cost the company millions to recall the gold master disk. These are what I like to call "billion dollar bugs" they might cost millions to postpone, but postponing them is delaying work that cost billions. When you have no "billion dollar bugs" for your team, then you are said to be "in escrow". In the final milestone, all bugs are either fixed, triaged/postponed, documented, or resolved won't fix. Eventually, when all teams have been in escrow for&nbsp;some given amount of time, management signs off that the quality of the product is good, and&nbsp;you ship it, throw a party, take a break, and begin working on another project (the best possible time to switch teams/jobs is just after you complete a project).</P>
<P>That's a rough outline of what happens in a normal milestone for Office or more generally over a release cycle for a smaller product. The last couple Windows versions of the Office suite&nbsp;(Office XP, Office 2003, Office 2007) all had about 2-3 years of development. Since typically we have something like 6 months in a milestone, we typically had something like 4-6 milestones. At the end of a milestone, we have a "deliverable" product. Between Major Milestones (MM1, MM2, MM3, etc) we have "dogfood builds" that are internally tested and tested by some customers with special relationships. In addition to major milestones, we have Beta testing Milestones,&nbsp;where the deliverable is&nbsp;tested by many&nbsp;customers outside the company&nbsp;(Beta 1, Beta 2, Beta 2TR, etc), and finally there are shipping and maintenance milestones (RC1, RTM, SP1, SP2, etc). The point of a milestone is that it has a "deliverable", be it a dogfood build, a beta build, or a shipping product or patched product (service pack). Each milestone ends with triage. The RTM milestone is special in that it generally begins in "team triage" and ends with multiple stages of triage (multiple stages of triage allow individual teams to synchronize their level of cuts/"quality bar").</P>
<P>Office is a very successful team at&nbsp;producing a product. All of the above&nbsp;background is important because in it I have littered the various ways which define "what you aren't going to ship". When customers feel frustrated with product issues, bugs, design of some feature, etc.&nbsp;They often write with feedback (via several mechanisms) about "Why can't I&nbsp;achieve X by doing Y with product Z?"&nbsp;The answer which is most likely the case and I always feel a little frustrated that I can't give you a direct example is:&nbsp;"We&nbsp;planned to deliver Y in release Z. It was cut with change # for bug # because of reasons R1, R2, R3, and R4 which are documented in the bug database. It is still visible to the team and management."</P>
<P>Remember what I wrote in the beginning of this post: "Shipping is a feature." We often cut your feature Y for shipping. When it comes right down to it,&nbsp;no other features are as important as shipping. That's the downside of what it takes (cutting) to ship a product like Office to about 500 Million paying customers. The upside is that you have a clearer goal - you know for each stage in the product development cycle that you are doing work in a methodical, targeted fashion, and at the end of the cycle there's&nbsp;on the order of&nbsp;more than&nbsp;a&nbsp;<STRONG>billion</STRONG> reasons why&nbsp;you will ship. Imagine for a moment that you have a team of people the size of Office - let's say for argument sake that the numbers are&nbsp;on the order of&nbsp;5,000 employees&nbsp;on average costing the company $100,000&nbsp;each per year for a&nbsp;2 year development cycle. So assume you have a&nbsp;2 * 5K * $100K = $1B cost to develop Office.The bottom line is that it costs <STRONG>over $1 Billion</STRONG> to develop&nbsp;a single release of Office (today).&nbsp;At the end of all that work,&nbsp;<STRONG>any bug which prevents you from shipping is a&nbsp;billion dollar&nbsp;bug</STRONG>.&nbsp;Teams which cut work earlier ship better features because they spend less time overall on the things that they won't ship and more time on the things that they will. By the time that they are in their last milestone, they have fewer billion dollar bugs.&nbsp;Very rarely does a billion dollar bug slip through the process (when it happens, it makes news).&nbsp;This takes me back to the top of this message:</P>
<P><STRONG>You don't know what you are shipping until you know what you are not shipping.</STRONG></P>
<P>Epilogue: It is painful to spend weeks and in some cases months or years of your time working on a feature to have it cut in whole or in part, but in the end, it is better for the customer to have your imperfect product in their hands than to still be working passionately on a product they will never get because it will never be perfect or bug free. Trust me when I say that developers feel&nbsp;customer pain. We probably feel your pain more than you realize - we had to&nbsp;suffer through&nbsp;cuts of some really cool features in order to ship the features that you have in time to make a release date.&nbsp;Key danger signs that your group is not going to ship is when you talk to your senior managers and find that they don't have the ability to say, "No, we're not doing super cool feature #. We spent # time investigating it, but couldn't get it to work right, and it is cut in favor of getting more basic and more important work&nbsp;that we just can't ship without to&nbsp;be high quality and&nbsp;stable." Managing a successful product means knowing how to make the painful cuts necessary to ship the right product.</P>
<P><STRONG>** Disclaimer:</STRONG> A bug in the context of this post means any feature of a product which works poorly&nbsp;from the perspective&nbsp;of&nbsp;the person who reported it to the product development team or the person in the product development team who filed the bug in the bug database.</P>
<P>This posting is provided "AS IS" with no warranties, and confers no rights.</P>]]></content:encoded>
    </item>
    <item>
      <title>The hardest part of writing successful software</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/the-hardest-part-of-writing-successful-software</link>
      <pubDate>Mon, 08 Jan 2007 20:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2007/01/08/the-hardest-part-of-writing-successful-software/</guid>
      <description><![CDATA[The hardest part of writing successful software is legacy. Once your software succeeds, you now have...]]></description>
      <content:encoded><![CDATA[<P>The hardest part of writing successful software is legacy. Once your software succeeds, you now have precedents that you must consider. A <A class="" href="http://developers.slashdot.org/article.pl?sid=07/01/05/0041212" mce_href="http://developers.slashdot.org/article.pl?sid=07/01/05/0041212">semi-recent slashdot article</A> points to a <A class="" href="http://www.robweir.com/blog/2006/01/how-to-hire-guillaume-portes.html" mce_href="http://www.robweir.com/blog/2006/01/how-to-hire-guillaume-portes.html">blogger</A> who&nbsp;talks about the new OOXML formats. I don't care&nbsp;to get into the merits of his argument. The point is that <STRONG>legacy is hard</STRONG>. Past success is no garuntee of future success. Microsoft has some very successful products and some very unsuccessful products, and there are good people who worked on both kinds of products. In order to be successful, you need to do some things right. In order to continue to be successful, you need to <STRONG>continue</STRONG> to do things right. Is OOXML wrong or right? Time will tell.</P>
<P>For example, you may not have heard of Visact 2000&nbsp;or Liquid Motion. Both of these products came out of the team I was originally hired into (trivia point:&nbsp;my business cards still say&nbsp;Office Activation although the current name of the team after our most recent re-org is Office Graphics). Fortunately, the technologies/people who built these products&nbsp;made their way into&nbsp;products/teams such as PowerPoint and products/teams with future potential like Expression. Will these products be successful and continue be successful? Only time will tell.</P>
<P>There are&nbsp;some people who criticize the new Office Open XML formats. As I already said, I don't want to debate them. Whether you&nbsp;love them,&nbsp;hate them, or simply don't care about them they are now part of the Office Legacy. The millions of customers already using them is evidence enough of this.&nbsp;I do want to make a quick point that passion about&nbsp;a product is a sign of success. Although you want people to love what you've done,&nbsp;it's hard to make something so universally good that everyone loves it. The fact that some people hate PowerPoint means that in some ways we have succeeded. Maybe in some ways we have failed - some people hate PowerPoint because they hate Microsoft for whatever reasons, and others hate something specific about PowerPoint (myself included - there are some features I just hate for my own reasons).</P>
<P>When new versions of the&nbsp;file formats&nbsp;come out, customers need to work with them. Unlike binary formats where the data structures and extensibility measures are locked down, XML formats can be harder to maintain. Indeed, with 6000+ pages of specs for Office Open XML there are&nbsp;a lot of areas to maintain.&nbsp;If customers can add their own extensibility tags willy nilly then there's nothing to prevent them from picking a tag name which conflicts with a tag name that we will use in the future for something else. If the conversion between binary and XML isn't perfect then loading and saving through the converters can change document content (and it&nbsp;happens to some extent). Also, in the future, there will undoubtedly be new features that need to be added. How well the XML changes to meet these new features without breaking and requiring rewrites will be&nbsp;lessons learned&nbsp;from&nbsp;the designers that came before. And that's not even mentioning bugs. I don't think we're perfect - there are bugs in those millions of lines of code that will result in someone either loving or hating the product in one version or the next. Sometimes we fix some feature&nbsp;in one version and break other features. I'm guilty of doing that to other people's features&nbsp;just as much as some other people are guilty of doing that to my features.</P>
<P>Another aspect to legacy is that not all of your users are modern in all ways. If your organization&nbsp;uses older applications&nbsp;and older documents written in older applications you would require new software you purchase to work with your old/existing formats. Office applications have a long history of file formats and converters.&nbsp;It's pretty cool how many formats Office can consume that are for products which no longer have active development but that you know <STRONG>someone</STRONG> out there depends on. People have good reason to support only the formats that they do and there is a cost-benefits analysis anyone writing&nbsp;converters understands (Office supports a lot of really old formats).&nbsp;A common theme in my recent&nbsp;messages is that you should do what is most valuable in your time on this earth because the opportunity cost of doing something else is not getting to do what is most valuable to you. For me that means that I have recently been spending a lot of time with my family and in particular, my 11 month old son.</P>
<P>The trick to deal with legacy in software is to give it respect and strive to&nbsp;serve as a&nbsp;better example in the future, because <STRONG>what you do leaves a legacy</STRONG>. Sometimes legacy is an ugly and&nbsp;hard problem, but without the past there can be no future. Some hacks will live on in infamy, but we learn valuable lessons from the past, and we leave valuable lessons for those who come to continue in our footsteps. My new years resolution for 2007 is to learn from past mistakes and strive to catch myself before I&nbsp;repeat&nbsp;them.</P>
<P>This posting is provided "AS IS" with no warranties, and confers no rights.</P>]]></content:encoded>
    </item>
    <item>
      <title>Good stuff in many blogs all around</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/good-stuff-in-many-blogs-all-around</link>
      <pubDate>Thu, 28 Dec 2006 17:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2006/12/28/good-stuff-in-many-blogs-all-around/</guid>
      <description><![CDATA[I was recently looking around at some good old blog posts and some of their comments by other...]]></description>
      <content:encoded><![CDATA[<P>I was recently looking around at some good old blog posts and some of their comments by other people.</P>
<P>Chris Becker in his post <A class="" href="http://blogs.msdn.com/coolbeans/archive/2006/12/21/risky-business.aspx" mce_href="http://blogs.msdn.com/coolbeans/archive/2006/12/21/risky-business.aspx">here</A> links to <A class="" href="http://blogs.msdn.com/chris_pratley/archive/2004/02/05/67871.aspx" mce_href="http://blogs.msdn.com/chris_pratley/archive/2004/02/05/67871.aspx">this old post</A> by Chris Pratley, which has a <A class="" href="http://blogs.msdn.com/chris_pratley/archive/2004/02/05/more-on-quality.aspx#68234" mce_href="http://blogs.msdn.com/chris_pratley/archive/2004/02/05/more-on-quality.aspx#68234">comment</A> by Rick Schaut which begins:</P>
<P>&nbsp;&nbsp; I've often referred to bugs whose ease of reproduction appears to run inversely proportional to the rigor with which one attempts to observe the cause of the bug as "Heisenberg" bugs.</P>
<P>I've heard them called "Heisenbugs". Heisenbugs are the reason why whenever I debug anything UI related I do it on a second console. It is the reason that unlike many other developers at Microsoft, each of my computers has its own keyboard, video, and mouse (and why I don't use KVM switches any more). My typical example of a Heisenbug goes something like this:</P>
<P>&nbsp;&nbsp; "Do {some complicated operation} in the UI and {something} doesn't redraw/update properly."</P>
<P>This is&nbsp;one&nbsp;class of UI interaction bug that&nbsp;is very difficult to debug on the same console as the debugger.&nbsp;The reason these bugs are Heisenbugs always goes something like: you switch windows to the debugger to investigate some piece of the problem and the window switching process causes an invalidation or other messages to be pumped to the application which fixes or changes the problem. Visual Studio has the wonderful ability to <A class="" href="http://msdn2.microsoft.com/en-us/library/bt727f1t.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bt727f1t.aspx">Remote Debug</A> a second machine, and that's what I use to debug just about all the time. It lets me see on one&nbsp;computer what the application running on the other computer is doing at a frozen moment in time. But enough on Heisenbugs (for now), I just thought I'd throw out one way of looking at the problem.</P>
<P>So anyway, back to my train of web links, I was looking at Rick Schaut's blog post <A class="" href="http://blogs.msdn.com/rick_schaut/archive/2006/08/09/693499.aspx" mce_href="http://blogs.msdn.com/rick_schaut/archive/2006/08/09/693499.aspx">here</A>, and then I&nbsp;read&nbsp;<A class="" href="http://davidweiss.blogspot.com/2006/12/on-context.html" mce_href="http://davidweiss.blogspot.com/2006/12/on-context.html">this post</A> from David Weiss which reminds me that nobody's perfect. So here I am reading Chris Pratley's <A class="" href="http://blogs.msdn.com/chris_pratley/archive/2006/12/06/onenote-viewer.aspx" mce_href="http://blogs.msdn.com/chris_pratley/archive/2006/12/06/onenote-viewer.aspx">latest post</A>&nbsp;about why there is no OneNote viewer, which references a <A class="" href="http://blogs.msdn.com/chris_pratley/archive/2004/01/31/why-doesn-t-onenote-have-feature-x.aspx" mce_href="http://blogs.msdn.com/chris_pratley/archive/2004/01/31/why-doesn-t-onenote-have-feature-x.aspx">rather old post of his</A>&nbsp;that he answers in an interesting way a few weeks later with <A class="" href="http://blogs.msdn.com/chris_pratley/archive/2004/02/10/onenote-and-version-1.aspx" mce_href="http://blogs.msdn.com/chris_pratley/archive/2004/02/10/onenote-and-version-1.aspx">another post about design</A>.</P>
<P>So I went from reading posts about why we put the brakes on taking fixes late, to posts about features which get cut, to the design of a product. Development has a lot to do with a principle I learned in a freshman&nbsp;economics class called opportunity cost. Our time on this planet is limited, and what we do with that time we can only do once. There is an opportunity cost of spending that time working on one of many different challenges/problems. That cost is that you can't spend time working on anything else. If the people at Microsoft do our jobs best, we spend that time working on the most important challenges/problems first.</P>
<P>In simpler words: we ship with bugs (any feature you don't like is a bug). If we did our jobs right, then&nbsp;we have addressed the most important bugs and the only&nbsp;bugs left over that we ship with are the ones that&nbsp;<STRONG>you</STRONG> care <STRONG>least</STRONG> about. That is the theme of the blog blog posts I have been reading. I wanted to end by saying that there are lots of passionate people at Microsoft.</P>
<P>This posting is provided "AS IS" with no warranties, and confers no rights.</P>]]></content:encoded>
    </item>
    <item>
      <title>Future thoughts</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/future-thoughts</link>
      <pubDate>Mon, 18 Dec 2006 02:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2006/12/18/future-thoughts/</guid>
      <description><![CDATA[First of all, I want to wish everyone&nbsp;happy holidays. I&nbsp;also want to give a shoutout to my...]]></description>
      <content:encoded><![CDATA[<P>First of all, I want to wish everyone&nbsp;happy holidays. I&nbsp;also want to give a shoutout to my friend/coworker <A class="" href="http://blogs.msdn.com/coolbeans/" mce_href="http://blogs.msdn.com/coolbeans/">Chris Becker</A>&nbsp;who just started his own blog this week. This blog post was written from a hotel room - like many people in the greater Seattle area, my home lost power. Unlike as many,&nbsp;power hasn't been restored to my home yet&nbsp;after 3 days... most of&nbsp;my friends got their power back today (Sunday). We lost power at 10PM on Thursday. My 10 month old son, Benjamin got himself a cold a few days ago, so we couldn't stay in our cold, powerless house.</P>
<P>It has been a busy time of year for me, and I haven't been posting much. One reason&nbsp;is that&nbsp;I haven't seen any comments on my postings before the comment period expires (the comment period is designed to cut down on spam comments to seemingly forgotten posts). I have seen some people write about Office and Microsoft and what it's like shipping a product, and also about what people do after a product ships. So what does a developer do after spending the better part of a year fixing up all the issues in a shipping product for 10-20+ hours a day after several years of working on a product? Well, this developer is changing teams! Mind you, it's not a big change. It's part of a re-org.&nbsp;:)</P>
<P>I'm still involved in the development of PowerPoint, just from a slightly more shared perspective.&nbsp;I'm now an Office "shared team"&nbsp;Developer. One needs to wear more hats in a shared team&nbsp;than being a PowerPoint developer; Excel, Word, Outlook, and&nbsp;the other Office applications&nbsp;each have their own rich history, functionality, and requirements which make writing code that runs well&nbsp;across&nbsp;many/all&nbsp;of them more challenging.</P>
<P>So it's the holiday season, and I'm making a new years resolution to be more communicative, but I need your help! What do you want me to write about? Do you like my previous posts? It has been a long time since I had any ideas about what to post. Here's to the future.</P>
<P>This posting is provided "AS IS" with no warranties, and confers no rights.</P>]]></content:encoded>
    </item>
    <item>
      <title>Creating a Custom Task Pane in PowerPoint 2007</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/creating-a-custom-task-pane-in-powerpoint-2007</link>
      <pubDate>Wed, 01 Nov 2006 15:00:27 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2006/11/01/creating-a-custom-task-pane-in-powerpoint-2007/</guid>
      <description><![CDATA[To start off a series of blog posts, I'm going to talk about creating a Custom Task Pane using...]]></description>
      <content:encoded><![CDATA[<p>To start off a series of blog posts, I'm going to talk about creating a Custom Task Pane using PowerPoint 2007 and Visual Studio Tools for Office. Before I get into any code, I wanted to point you to the resources you can use to do this and some <a href="http://msdn.microsoft.com/office/learn/screencasts/">screencasts</a> which you should follow along with for more detailed information of how to do some of the nitty gritty details that I don't want to cover because they are well presented. Before we begin you should already have Visual Studio 2005 and Visual Studio Tools for Office, the current beta can be downloaded for free -&nbsp;see <a href="http://blogs.msdn.com/pstubbs/archive/2006/09/14/754396.aspx">this blog post</a>&nbsp;(dated 9/13/2006)&nbsp;for details.</p> <p>There are 2 screencasts demonstrating how to add a&nbsp;Custom Task Pane to Office applications, specifically Word and Excel. You can find them here:</p> <p>1.&nbsp;<a title="Extending the Office 2007 UI with a Custom Task Pane" href="http://go.microsoft.com/?linkid=5519368">Extending the Office 2007 UI with a Custom Task Pane</a><br>2. <a title="Creating Custom Task Panes in Visual Studio Tools for Office v3 June CTP" href="http://go.microsoft.com/?linkid=5519362">Creating Custom Task Panes in Visual Studio Tools for Office v3 June CTP</a></p> <p>Later in this series I will also refer to the screencasts which show how you customize the Ribbon and demonstrate&nbsp;how you can make a custom XML Part and load/save it from your add-in when loading/saving PowerPoint files. This series will be in C#. You can do everything I describe here in other .NET languages as well as from any language using COM, but I personally find C# to be the easiest because it is supported by wonderful tools like Visual Studio Tools for Office. I have no reason to believe that you can't do everything below in Visual Studio Express editions and by locating the appropriate places to plug in your add-in using the Registry. Having said this, I tried it at home and decided it wasn't worth the effort. I wanted to stop for a moment to plug&nbsp;<a href="http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/">Collin Coller's Copy Source as HTML add-in for Visual Studio 2005</a>. If you are a blogger looking to show example code listings, this is a great tool.</p> <p>So follow the Tim Patterson's screencast (1 in the list above) and pick PowerPoint instead of Word. I named my shared add-in project "StoredSelectionPane", and I inserted a custom control into the project (rather than creating a new project) called "TaskpaneControl".</p> <h4 align="center">Listing 1: Connect.cs: C# code to show the "Stored Selections" Custom Task Pane in this example.</h4> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;<span style="color: blue">namespace</span> StoredSelectionPane</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;{</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">using</span> System;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">using</span> Extensibility;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">using</span> System.Runtime.InteropServices;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">using</span> MSO = Microsoft.Office.Core;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">using</span> PPT = Microsoft.Office.Interop.PowerPoint;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;&nbsp;&nbsp; [<span style="color: teal">GuidAttribute</span>(<span style="color: maroon">"<strike>549D3E43-47D0-468D-91E0-EE3690BF53A2</strike>"</span>), <span style="color: teal">ProgId</span>(<span style="color: maroon">"StoredSelectionPane.Connect"</span>)]</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">class</span> <span style="color: teal">Connect</span> : <span style="color: teal">Object</span>, Extensibility.<span style="color: teal">IDTExtensibility2</span>, MSO.<span style="color: teal">ICustomTaskPaneConsumer</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> PPT.<span style="color: teal">Application</span> pptApplication;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">object</span> addInInstance;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;14</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;15</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> OnConnection(<span style="color: blue">object</span> application, Extensibility.<span style="color: teal">ext_ConnectMode</span> connectMode, <span style="color: blue">object</span> addInInst, <span style="color: blue">ref</span> System.<span style="color: teal">Array</span> custom)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;16</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;17</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; pptApplication = (PPT.<span style="color: teal">Application</span>) application;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;18</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; addInInstance = addInInst;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;19</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;20</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;21</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> CTPFactoryAvailable(MSO.<span style="color: teal">ICTPFactory</span> CTPFactoryInst)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;22</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;23</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; MSO.<span style="color: teal">CustomTaskPane</span> ctp =</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;24</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; CTPFactoryInst.CreateCTP(<span style="color: maroon">"StoredSelectionPane.TaskpaneControl"</span>, <span style="color: maroon">"Stored Selections"</span>, <span style="color: teal">Type</span>.Missing);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;25</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; ctp.Visible = <span style="color: blue">true</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;26</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;27</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;28</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: green">// Unimplemented interface members</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;29</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> OnDisconnection(Extensibility.<span style="color: teal">ext_DisconnectMode</span> disconnectMode, <span style="color: blue">ref</span> System.<span style="color: teal">Array</span> custom) {}</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;30</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> OnAddInsUpdate(<span style="color: blue">ref</span> System.<span style="color: teal">Array</span> custom) {}</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;31</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> OnStartupComplete(<span style="color: blue">ref</span> System.<span style="color: teal">Array</span> custom) {}</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;32</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> OnBeginShutdown(<span style="color: blue">ref</span> System.<span style="color: teal">Array</span> custom) {}</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;33</span>&nbsp;&nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;34</span>&nbsp;}</p></div> <p>I just wanted to remind people that GUIDs are unique - <strong>don't copy/paste the code on line 9 of listing 1</strong>. Instead, follow the Wizards as demonstrated in the screencasts above. The important things to note above are on lines 12 and 17, where I changed the type from object to PPT.Application (line 7 aliases PPT to Microsoft.Office.Interop.PowerPoint both to keep the namespace explicit and for convenience). Note that in order to get access to Microsoft.Office.Interop.PowerPoint, you will need to add a reference to the PowerPoint 12 COM DLL to your project. Note that line 24 tells the Custom Task Pane factory to create a Custom Task Pane with StoredSelectionPane.TaskPaneControl as the ProgId. You need to create the control and name it appropriately if you want this method call to work... The ProgId for your control goes into a special place in the Registry when you install the project. Visual Studio and Visual Studio Tools for Office handle connecting all of this for you in your install project. When you create a new user control in C#, Visual Studio generates you a class to hold all your interactions. In this case, I named my custom control TaskpaneControl and added it to the StoredSelectionPane project. The generated code for my taskpane control starts like this (I added my aliases to this file as well. We will use them throughout):</p> <h4 align="center">Listing 2: TaskpaneControl.cs (code editor view): The user control generated code.</h4> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;<span style="color: blue">using</span> System;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;<span style="color: blue">using</span> System.Collections.Generic;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;<span style="color: blue">using</span> System.ComponentModel;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;<span style="color: blue">using</span> System.Drawing;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;<span style="color: blue">using</span> System.Data;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;<span style="color: blue">using</span> System.Text;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;<span style="color: blue">using</span> System.Windows.Forms;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;<span style="color: blue">using</span> MSO = Microsoft.Office.Core;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;<span style="color: blue">using</span> PPT = Microsoft.Office.Interop.PowerPoint;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;<span style="color: blue">namespace</span> StoredSelectionPane</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;{</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">partial</span> <span style="color: blue">class</span> <span style="color: teal">TaskpaneControl</span> : <span style="color: teal">UserControl</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;14</span>&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;15</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> TaskpaneControl()</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;16</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;17</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; InitializeComponent();</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;18</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p></div> <p>We currently have a plain vanilla control.&nbsp;The idea I had for this control was to allow the user to save and recall shape selections.&nbsp;When working with large and complicated slides with hundreds of shapes, I find it useful to be able to quickly select a set of shapes which have some meaningful relationship. So with that concept in mind, we're going to add a ListView control, and some buttons. The buttons will be inside of a FlowLayoutPanel that is docked to the top of the pane and set to auto size to ensure that it is tall enough to show all controls when the user resizes the pane.&nbsp;The ListView control will be docked to fill the remaining space below the buttons. For buttons, I'm going to add "Add", "Remove", "Select", "Show", and "Hide". For each button, I have set AutoSize to true, AutoSizeMode to GrowAndShrink, and I have renamed the buttons from the generated names to match their text. For the ListView, I set the View type to be List (the default is Large Icon) I have turned off MultiSelect so that you can only work with one selection at a time. I have also turned off HideSelection so that when&nbsp;the control is&nbsp;out of focus you can still see the selected item. Double clicking each button creates callback methods and attaches them to their appropriate controls in the generated code. At this point, it is important to think about what we are going to do. Each entry in our ListView will be associated with a "Stored Selection". For convenience, I have written a small class to facilitate this. We will expand its functionality later, but first we need to talk about the constructor and members:</p> <h4 align="center">Listing 3: The StoredSelection helper class constructor.</h4> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;&nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">class</span> <span style="color: teal">StoredSelection</span> : <span style="color: teal">ListViewItem</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">int</span> m_slideId = -1;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: teal">List</span>&lt;<span style="color: blue">int</span>&gt; m_ids = <span style="color: blue">new</span> <span style="color: teal">List</span>&lt;<span style="color: blue">int</span>&gt;();</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> StoredSelection(PPT.<span style="color: teal">Selection</span> selection) : <span style="color: blue">base</span>(<span style="color: maroon">"Empty Selection"</span>)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span>(selection.Type != PPT.<span style="color: teal">PpSelectionType</span>.ppSelectionShapes)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">return</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; m_slideId = selection.SlideRange.SlideID;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; PPT.<span style="color: teal">ShapeRange</span> range = selection.HasChildShapeRange ? selection.ChildShapeRange</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; : selection.ShapeRange;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">string</span> selectionName = <span style="color: maroon">"Shape Selection ("</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;14</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">bool</span> fFirst = <span style="color: blue">true</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;15</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">foreach</span> (PPT.<span style="color: teal">Shape</span> shape <span style="color: blue">in</span> range)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;16</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;17</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; m_ids.Add(shape.Id);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;18</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; selectionName += fFirst ? shape.Name : <span style="color: maroon">", "</span> + shape.Name;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;19</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; fFirst = <span style="color: blue">false</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;20</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;21</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; selectionName += <span style="color: maroon">")"</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;22</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">base</span>.Text = selectionName;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;23</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;24</span>&nbsp;&nbsp;&nbsp; }</p></div> <p>The StoredSelection class is called with a PowerPoint selection. Rather than associating each stored selection with&nbsp;an item in our list view, we will subclass the ListViewItem to store these&nbsp;selections inside the ListView. We set the default string to "Empty Selection". If the user of this class constructs us with a non-shape selection, this is an error case, but since we will need a valid m_slideId in order to do anything, the defaultly initialized m_slideId = -1 will ensure that in this case we won't be usable. Line 10 demonstrates that you have 2 kinds of shape selections, and we need to handle them both separately throughout to support&nbsp;working with children of group shapes. In order to consume our StoredSelection class so far, let's implement the AddButton callback.</p> <h4 align="center">Listing 4: Getting the PPT.Application and implementing the AddButton callback</h4> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"><span style="color: #2b91af"> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> PPT.<span style="color: teal">Application</span> m_app = <span style="color: blue">null</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> SetApp( PPT.<span style="color: teal">Application</span> app )</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; m_app = app;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">void</span> AddButton_Click(<span style="color: blue">object</span> sender, <span style="color: teal">EventArgs</span> e)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; PPT.<span style="color: teal">Selection</span> selection = m_app.ActiveWindow.Selection;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (selection.Type != PPT.<span style="color: teal">PpSelectionType</span>.ppSelectionShapes)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">return</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; SelectionListView.Items.Add(<span style="color: blue">new</span> <span style="color: teal">StoredSelection</span>(selection));</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p></div><!--EndFragment--></span></div> <p>Note that for convenience, we will add a pointer to an&nbsp;instance of the PPT.Application interface to our Taskpane. We need to be very careful here. Do not be tempted to set m_app to "new PPT.ApplicationClass()". That will create a new instance of PowerPoint, which will keep alive your add-in after closing the instance of PowerPoint which you connected to. Go back to Connect.cs and add the following between lines 24 and 25 in listing 1 above:</p> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; ((<span style="color: teal">TaskpaneControl</span>)ctp.ContentControl).SetApp(pptApplication);</p></div> <p>This will let us use the application class&nbsp;without having to worry about new instance lifetimes keeping alive PowerPoint DLL instances on your machine after closing. Now lets implement the other buttons, starting with Remove:</p> <h4 align="center">Listing 5: Get the currently selected item and do something with it (part 1)</h4> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: teal">StoredSelection</span> GetSelection()</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (SelectionListView.SelectedItems == <span style="color: blue">null</span> ||</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; SelectionListView.SelectedItems.Count != 1)</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">return</span> <span style="color: blue">null</span>;</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">return</span> (<span style="color: teal">StoredSelection</span>)SelectionListView.SelectedItems[0];</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">void</span> RemoveButton_Click(<span style="color: blue">object</span> sender, <span style="color: teal">EventArgs</span> e)</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: teal">StoredSelection</span> selection = GetSelection();</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span>( selection != <span style="color: blue">null</span> )</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; SelectionListView.Items.Remove(selection);</p> <p style="font-size: 10pt; background: white; margin: 0px; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;14</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p><!--EndFragment--> <p>And now you can add and remove stored selections from the list. The rest of the buttons we will delegate the action down to some new methods on the StoredSelection class.</p> <h4 align="center">Listing 6: Get the currently selected item and do something with it (part 2)</h4> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">void</span> SelectButton_Click(<span style="color: blue">object</span> sender, <span style="color: teal">EventArgs</span> e)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: teal">StoredSelection</span> selection = GetSelection();</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (selection != <span style="color: blue">null</span>)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; selection.Select(m_app.ActiveWindow);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">void</span> ShowButton_Click(<span style="color: blue">object</span> sender, <span style="color: teal">EventArgs</span> e)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: teal">StoredSelection</span> selection = GetSelection();</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (selection != <span style="color: blue">null</span>)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; selection.SetVisible(m_app.ActiveWindow, <span style="color: blue">true</span>);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;14</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;15</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">void</span> HideButton_Click(<span style="color: blue">object</span> sender, <span style="color: teal">EventArgs</span> e)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;16</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;17</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: teal">StoredSelection</span> selection = GetSelection();</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;18</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (selection != <span style="color: blue">null</span>)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;19</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; selection.SetVisible(m_app.ActiveWindow, <span style="color: blue">false</span>);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;20</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p></div> <p><!--EndFragment-->So now we just need to implement Select and SetVisible. Note that we pass along the active window to these methods. We will use the active window to search through the shapes on the slide, and do something for the shapes whose ids match those in the list. Remember that we stored the Shape.Id in the&nbsp;List&lt;int&gt; in the StoredSelection class (see listing 3 lines 4 and 17).</p> <h4 align="center">Listing 7: Implement StoredSelection.Select</h4> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> Select(PPT.<span style="color: teal">DocumentWindow</span> activeWindow)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (m_slideId &lt; 0 || activeWindow.Selection.SlideRange.SlideID != m_slideId)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">return</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: green">// Iterate over all shapes in the current slide</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; PPT.<span style="color: teal">Shapes</span> shapes = activeWindow.Selection.SlideRange.Shapes;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; activeWindow.Selection.Unselect();</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">foreach</span> (<span style="color: blue">int</span> id <span style="color: blue">in</span> m_ids)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">foreach</span> (PPT.<span style="color: teal">Shape</span> shape <span style="color: blue">in</span> shapes)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Select(shape, id);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;14</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">void</span> Select(PPT.<span style="color: teal">Shape</span> shape, <span style="color: blue">int</span> id)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;15</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;16</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (shape.Id == id)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;17</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;18</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">try</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;19</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;20</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; shape.Select(MSO.<span style="color: teal">MsoTriState</span>.msoFalse <span style="color: green">/*Replace*/</span>);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;21</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;22</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">catch</span> (<span style="color: teal">Exception</span> e)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;23</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;24</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;25</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;26</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">else</span> <span style="color: blue">if</span> (shape.Type == MSO.<span style="color: teal">MsoShapeType</span>.msoGroup)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;27</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;28</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: green">// Recurse over sub-shapes. id could be the Shape.Id of a child.</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;29</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">foreach</span> (PPT.<span style="color: teal">Shape</span> childShape <span style="color: blue">in</span> shape.GroupItems)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;30</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Select(childShape, id);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;31</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;32</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p></div><!--EndFragment--> <p>There are a few important issues to consider when selecting. This implementation replaces the shape selection with a new selection built up. Note that PPT.Shape.Select&nbsp;will throw an exception if you attempt to select a shape which is not selectable.&nbsp;This is undersireable. If for example, you have a selection which includes shapes that are hidden, it would be good to select just the shapes you can select. On line 8, we clear the selection. On line 20, we add the shape whose ID matches. lines 9-11 and 29-30 ensure that we search recursively through the whole tree of shapes including iterating through groups. Finally, we implement SetVisible.</p> <h4 align="center">Listing 8: Implement SetVisible</h4> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">public</span> <span style="color: blue">void</span> SetVisible(PPT.<span style="color: teal">DocumentWindow</span> activeWindow, <span style="color: blue">bool</span> fVisible)</div></div> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (m_slideId &lt; 0 || activeWindow.Selection.SlideRange.SlideID != m_slideId)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;4</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">return</span>;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;5</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;6</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: green">// Iterate over all shapes in the current slide</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;7</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; PPT.<span style="color: teal">Shapes</span> shapes = activeWindow.Selection.SlideRange.Shapes;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;8</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">foreach</span> (<span style="color: blue">int</span> id <span style="color: blue">in</span> m_ids)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;&nbsp;9</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">foreach</span> (PPT.<span style="color: teal">Shape</span> shape <span style="color: blue">in</span> shapes)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;10</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; SetVisible(shape, id, fVisible);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;11</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;12</span>&nbsp;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;13</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">private</span> <span style="color: blue">void</span> SetVisible(PPT.<span style="color: teal">Shape</span> shape, <span style="color: blue">int</span> id, <span style="color: blue">bool</span> fVisible)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;14</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;15</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">if</span> (id == shape.Id)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;16</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;17</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">try</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;18</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;19</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; shape.Visible = fVisible ? MSO.<span style="color: teal">MsoTriState</span>.msoTrue : MSO.<span style="color: teal">MsoTriState</span>.msoFalse;</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;20</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;21</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">catch</span> (<span style="color: teal">Exception</span> e)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;22</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;23</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;24</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;25</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">else</span> <span style="color: blue">if</span> (shape.Type == MSO.<span style="color: teal">MsoShapeType</span>.msoGroup)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;26</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; {</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;27</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: green">// Recurse over sub-shapes. id could be the Shape.Id of a child.</span></p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;28</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: blue">foreach</span> (PPT.<span style="color: teal">Shape</span> childShape <span style="color: blue">in</span> shape.GroupItems)</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;29</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; SetVisible(childShape, id, fVisible);</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;30</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }</p> <p style="margin: 0px"><span style="color: #2b91af">&nbsp;&nbsp;&nbsp;31</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }</p></div><!--EndFragment--> <p>This is almost identical to the previous code listing. We have one line less because we didn't need to reset the selection. The signature of these methods is slightly different so we can pass down the value to set the visibility to for all shapes in the stored selection. Note that if you have nested shapes, and you&nbsp;set their visibility to true, that operation does not&nbsp;affect the visibility of their parent group shape, but if you&nbsp;set the visibility of a group shape, it does&nbsp;set the visibility of its children (and their children).</p> <p>Next time, we will address some flaws in this approach and&nbsp;add support to save and load custom XML for this add-in.</p> <p>This posting is provided AS-IS with no warranties expressed or implied.</p>]]></content:encoded>
    </item>
    <item>
      <title>On account of not posting for a while...</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/on-account-of-not-posting-for-a-while</link>
      <pubDate>Fri, 29 Sep 2006 18:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2006/09/29/on-account-of-not-posting-for-a-while/</guid>
      <description><![CDATA[One of the reasons I started this blog was to address what I felt are the needs of the Office...]]></description>
      <content:encoded><![CDATA[<P>One of the reasons I started this blog was to address what I felt are the needs of the Office technical community to get technical information that wasn't available on the other blogs. Unfortunately, most of the other blogs have been doing a better job at keeping up with producing information than I have been lately. I just wanted to reassure my readers that the time I've spent not blogging recently means that you will get a better PowerPoint 2007. I hope to resume posting useful content more regularly soon.</P>]]></content:encoded>
    </item>
    <item>
      <title>PowerPoint Table Styles XML (Part 2)</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/powerpoint-table-styles-xml-part-2</link>
      <pubDate>Wed, 20 Sep 2006 15:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2006/09/20/powerpoint-table-styles-xml-part-2/</guid>
      <description><![CDATA[This time we will look at the table style portion of PresentationML in the Office Open XML Format...]]></description>
      <content:encoded><![CDATA[<P>This time we will look at the table style portion of PresentationML in the <A href="http://openxmldeveloper.org/">Office Open XML Format</A> and we will go through many of the finer details of how to make one. To get PowerPoint to generate the XML for a built-in table style, you simply insert a Table and Save as PPTX. Rename your PPTX file to .ZIP, and look under ppt\tableStyles.xml. You will see something resembling the following:</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;?</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">xml</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'">version</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">=</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">1.0</SPAN>"<SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">encoding</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">UTF-8</SPAN>"<SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">standalone</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">yes</SPAN>"<SPAN style="COLOR: blue">?&gt;<BR></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">a:tblStyleLst</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier 
New'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'">xmlns:a</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">=</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">http://schemas.openxmlformats.org/drawingml/2006/main</SPAN>"<SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">def</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}</SPAN>"<SPAN style="COLOR: blue">&gt;<BR></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">a:tblStyle</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'">styleId</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier 
New'">=</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}</SPAN>"<SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">styleName</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">Medium Style 2 - Accent 1</SPAN>"<SPAN style="COLOR: blue">&gt;<BR></SPAN></SPAN>…</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal">Colors and formatting here are from Visual Studio, but you can use any old text editor such as notepad to edit these XML files. The default table style here is specified with the GUID <SPAN style="FONT-FAMILY: 'Courier New'">{5C22544A-7EE6-4342-85BDC9FD1C3A}</SPAN>. It is the only style listed in the list above. Let’s start by removing it from the list and making a new custom style. Create a new GUID (either using a <A href="http://www.microsoft.com/downloads/details.aspx?familyid=94551f58-484f-4a8c-bb39-adb270833afc&amp;displaylang=en">GUID Generating tool</A> or an <A href="http://www.guidgen.com/">online GUID Generator</A>). For example, I used the online GUID Generator and got: <SPAN style="FONT-FAMILY: 'Courier New'">{90651C3A-4460-11DB-9652-00E08161165F}</SPAN>. You do not need to capitalize all the hexadecimal letters (but I do so because earlier beta versions required that your GUIDs be in capital hexadecimal). Let’s start with a minimal style. Here it is:</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">a:tblStyle</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier 
New'">styleId</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">=</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">{90651C3A-4460-11DB-9652-00E08161165F}</SPAN>"<SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">styleName</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">Empty Custom Style</SPAN>"<SPAN style="COLOR: blue"> /&gt;</SPAN></SPAN></P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal">It doesn’t do much, but it gets the point across. Save your modified tableStyles.xml, copy your ZIP file to a new PPTX, apply your custom style to the table, and PowerPoint will show you the fruits of your labor:</P>
<P align=center><A href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com//original/tablestyle1.aspx" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/original/TableStyle1.aspx" target=_blank><IMG src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/00/76/39/10/Table_Style_Demo_Empty.PNG" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/763910/500x375.aspx" border=0></A></P>
<P>What is the point of customizing a style if you don’t do anything with it? Well, it lets you see what the default values are. Generate a new GUID and we can start a real example:</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">a:tblStyle</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier 
New'">styleId</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">=</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">{put your GUID here}</SPAN>"<SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">styleName</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">Example Custom Style 1</SPAN>"<SPAN style="COLOR: blue">&gt;</SPAN></SPAN></P>
<P><BR>We will start out by setting the background:</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tblBg</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:fillRef</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">idx</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">3</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:schemeClr</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">accent1</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tint</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">50000</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:schemeClr</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:fillRef</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:effectRef</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">idx</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">2</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:schemeClr</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">accent2</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:effectRef</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tblBg</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;</SPAN></SPAN></P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal">Note that we are setting the fill to refer to the style matrix with index = 3 (intense fill) and the effect to refer to the style matrix with index = 2 (moderate effect). This means that our custom style will appear different when the user changes themes. See <A href="http://blogs.msdn.com/jensenh/archive/2006/02/22/537054.aspx">Howard’s post on the topic</A> for more info. These indices refer to the columns in “Style Matrix” from Howard’s post (0 = no line/fill/effect, 1 = Subtle, 2 = Moderate, 3 = Intense):</P>
<P align=center><IMG src="http://www.sunflowerhead.com/msimages/EffectSchemeDiagram.png"></P>
<P>Note: If you wanted to give a specific appearance to your tables, you do not have to use themed elements (fonts, fills, lines, and effects) and instead can specify your own fonts, fills, lines, and effects. You are not limited to the colors from the color scheme. Scheme colors are one of 6 ways to specify colors.</P>
<P>Now that we have set the background fill/effect for the whole table, we will set properties which apply to all cells in the table (whole table part style). This part defines the default appearance for all of the cells in the table in their default state. The first thing we set is the table cell text style (tcTxStyle):</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:wholeTbl</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcTxStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:fontRef</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">idx</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">minor</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:schemeClr</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">dk1</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcTxStyle</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;</SPAN></SPAN></P>
<P>We pick the minor font (used for text – the major font would be used for headings – this is discussed a few times in Howard’s posts). We use the dk1 (Dark &nbsp;1) color for our text. Notice that we tinted our table background color by 50% above. Tint makes the color lighter. Shade makes the color darker. By tinting the background color by 50%, we make it contrast more with our dark 1 colored text. There are other good choices here, and I wanted to highlight that tx1 (Text 1) maps to either dk1 (Dark 1) or lt1 (Light 1), and bg1 (Background 1) maps to the contrasting color (same for tx2, bg2, dk2, and lt2). You set which light/dark pair are used with the background style gallery in the design tab. If your table style has no fill, then using tx1 or tx2 will make your text more likely to contrast against the slide background (but this is not a guarantee – the slide background may have images, there may be shapes on the master, or you can have other shapes under your table). If you wanted to always ensure that your text will contrast and still show design elements under it, you can use a semi-transparent fill (see below) of bg1 or bg2 to mute the background or other slide content under your table. I recommend using an un-themed solid fill in this case.</P>
<P>Next we will set the line styles for the outer edges of the table with accent 3 and the “subtle” line style from the theme. Note that these lines are the lines around and inside the “whole table” part. Top here is a continuous single line from the top left to the top right (in Left-to-Right language tables). We empty out the inner line styles (the diagonals are empty by default, but the inner horizontal/vertical lines are set by default). I have collapsed these XML elements on individual lines to save space.</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:tcStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:tcBdr</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:left</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:lnRef</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: red">idx</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 8.5pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">1</SPAN>"<SPAN style="COLOR: blue">&gt;&lt;</SPAN><SPAN style="COLOR: maroon">a:schemeClr</SPAN><SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">val</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">accent3</SPAN>"<SPAN style="COLOR: blue">/&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:lnRef</SPAN><SPAN style="COLOR: blue">&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:left</SPAN></SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:right</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:lnRef</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: red">idx</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 8.5pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">1</SPAN>"<SPAN style="COLOR: blue">&gt;&lt;</SPAN><SPAN style="COLOR: maroon">a:schemeClr</SPAN><SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">val</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">accent3</SPAN>"<SPAN style="COLOR: blue">/&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:lnRef</SPAN><SPAN style="COLOR: blue">&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:right</SPAN></SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:top</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:lnRef</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: red">idx</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 8.5pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">1</SPAN>"<SPAN style="COLOR: blue">&gt;&lt;</SPAN><SPAN style="COLOR: maroon">a:schemeClr</SPAN><SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">val</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">accent3</SPAN>"<SPAN style="COLOR: blue">/&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:lnRef</SPAN><SPAN style="COLOR: blue">&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:top</SPAN></SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:bottom</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:lnRef</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: red">idx</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 8.5pt"><SPAN style="FONT-FAMILY: Courier New">"<SPAN style="COLOR: blue">1</SPAN>"<SPAN style="COLOR: blue">&gt;&lt;</SPAN><SPAN style="COLOR: maroon">a:schemeClr</SPAN><SPAN style="COLOR: blue"> </SPAN><SPAN style="COLOR: red">val</SPAN><SPAN style="COLOR: blue">=</SPAN>"<SPAN style="COLOR: blue">accent3</SPAN>"<SPAN style="COLOR: blue">/&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:lnRef</SPAN><SPAN style="COLOR: blue">&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">a:bottom</SPAN></SPAN><SPAN style="COLOR: blue; FONT-FAMILY: Courier New">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:insideH</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:ln</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:noFill</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">/&gt;&lt;/</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:ln</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;/</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:insideH</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:insideV</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:ln</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:noFill</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">/&gt;&lt;/</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:ln</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;&lt;/</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:insideV</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: maroon">a:tcBdr</SPAN><SPAN style="FONT-SIZE: 8.5pt; COLOR: blue">&gt;</SPAN></SPAN></P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal">After specifying the border line styles, we define a fill for all the cells in the table. Note that cells are drawn on top of the table background. Since we already have a contrasting set of colors for the table background and the default text color, we really don’t need to tweak this part. The default is “no fill”, but I’m going to set it explicitly just to indicate how it is done:</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:fill</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:noFill</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">/&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:fill</SPAN></SPAN><SPAN style="FONT-FAMILY: Courier New"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcStyle</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;</SPAN></SPAN></P>
<P>And that’s it for the whole table part. Let’s close the table style tags now.</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">a:wholeTbl</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'">&lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'">a:tblStyle</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'">&gt;</SPAN></P>
<P>Save the XML file, copy the ZIP to a new PPTX file, and load it into PowerPoint. After applying the new table style, we see should see something like this:</P>
<P align=center><A href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com//original/tablestyle2.aspx" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/original/TableStyle2.aspx" target=_blank><IMG src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/00/76/39/12/Table_Style_Demo_Sample1.PNG" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/763912/500x375.aspx" border=0></A></P>
<P>Notice that there are grid lines showing in the table in the document, but no gridlines showing in the thumbnail. The default setting in the Table Tools/Layout tab is to show gridlines when editing the table. This setting is not table or document specific.</P>
<P>We haven’t specified the top row, bottom row, or any other part. Users of our table style will want to be able to express subtle or not-so-subtle structure in the data that they enter into their tables. Our design is not yet done. We don’t need to change every part, but at the moment we have a very uninteresting style.</P>
<P>The next set of parts defined in the table are the horizontal and vertical bands. “band1H” applies to every “odd” row starting after the first (also called header) row and before the last (also called total) row (if the header or total row parts are applied) and “band2H” applies to the “even” rows. Similarly, “band1V” applies to every “odd” column after the first column (left column in left-to-right languages) and before the last column (right column in left-to-right languages) and “band2V” applies to the “even” columns.</P>
<P>For this example table style, remember that the background fill is using dark 1 for the text color and accent 1 tinted to be 50% brighter as color for the intense theme filled background. Let’s change the background fill and text color for odd rows and lets make the text <I>italic</I> for odd columns. Insert the following before the close tag for our table style:</P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:band1H</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcTxStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:schemeClr</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">lt1</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcTxStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcBdr</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">/&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:fill</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:solidFill</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:schemeClr</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">dk1</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:alpha</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">33333</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:schemeClr</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:solidFill</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:fill</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:band1H</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:band2H</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">/&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:band1V</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcTxStyle</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">i</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">on</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:band1V</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; LINE-HEIGHT: 115%">a:band2V</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%">/&gt;</SPAN></SPAN></P>
<P>Rather than make the background a solid fill using an opaque color, I set the “alpha transparency” on the color to 33.333% here (the alpha value is the opacity – the opposite of transparency. The 33.333% value here means it is 2/3<SUP>rds</SUP> transparent). Note that this is not a themed fill. By choosing a solid color fill with a mostly transparent color, we are effectively darkening the whole table background fill underneath the cells affected by this part. This means that if the “intense” fill effect used by our table background has a picture in it (or some cool gradient fill, pattern fill, etc) then we don’t completely cover it up, but we still make sure that the text color will contrast with it. Here is what the effect now looks like with a theme with a picture fill (from the built-in paper theme):</P>
<P align=center><A href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com//original/tablestyle3.aspx" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/original/TableStyle3.aspx" target=_blank><IMG src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/00/76/39/15/Table_Style_Demo_Sample2.PNG" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/763915/500x375.aspx" border=0></A></P>
<P>For the last column, lets give our style a gradient filled line from Red to Blue on the left. This isn’t going to look good with all styles or color schemes. The point is to demonstrate that it can be done and how you would do it. </P>
<P style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal"><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:lastCol</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcBdr</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:left</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:ln</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">w</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">127000</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gradFill</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gsLst</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gs</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">pos</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">0</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:prstClr</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">red</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gs</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gs</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">pos</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">100000</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:prstClr</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">val</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">blue</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gs</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gsLst</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:lin</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: red">ang</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">=</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt"><SPAN style="FONT-FAMILY: 'Courier New'">"<SPAN style="COLOR: blue">5400000</SPAN>"</SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">/&gt;<BR></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:gradFill</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:ln</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:left</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcBdr</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:tcStyle</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;<BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&nbsp;&nbsp; &lt;/</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: maroon">a:lastCol</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue">&gt;</SPAN></SPAN></P>
<P>We express the thickness of the line in EMUs (English Metric Units). Note that 914,400 EMUs make up an inch. 360,000 EMUs make up a centimeter, and 12,700 EMUs make up a “point” (1/72<SUP>nd</SUP> of an inch). Note that the gradient fill is a linear gradient fill, and the angle is at 90 degrees. The angle is expressed in units where 60,000 = 1 degree. The stops of the gradient fill are at 0% and 100.000%, and we are using preset colors this time. You can have as many stops as you want. I set the thickness to 10 “points” here.</P>
<P>If you merge cells horizontally in your table so that the last column runs through your merged cell, you will notice something interesting: the line which we have styled will move around your merged cells. There is a complicated bit of logic in the table styling engine which handles these special cases, and I just thought I would point it out because it is cool. A gradient fill is useful to demonstrate this edge case as it shows how the line is broken down into segments. I chose this example to demonstrate some features of table styles.</P>
<P align=center><A href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com//original/tablestyle4.aspx" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/original/TableStyle4.aspx" target=_blank><IMG src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/00/76/39/17/Table_Style_Demo_Sample3.PNG" original-url="http://blogs.msdn.com/photos/mike_frieds_photos/images/763917/500x375.aspx" border=0></A></P>
<P>That’s a lot of material to cover for one post. Feel free to play with this and leave comments and questions. Let us know what you think. The XML format is very powerful, but there are no fine-grained error messages to tell you what you broke when hand-editing the XML. Most Office users are not expected to do this, and PowerPoint will recover your data even in the case that your table styles are invalid. Be careful not to do too much work on an XML file without saving and making sure that PowerPoint loads it and your table appears to be styled correctly. Don’t forget that the Table Styles XML elements are in the “DrawingML / Office Art” (a:) namespace. Other elements in the XML file in a PowerPoint presentation are in the “PresentationML / PPT” (p:) namespace. I want to thank Jason Schneekloth (the Tables/Table Styles PM) for his help editing this post and for <A href="http://blogs.msdn.com/powerpoint/archive/2006/07/21/674214.aspx">his post</A> on the topic as well as the rest of the team that implemented this feature.</P>
<P>This posting is provided “AS IS” with no warranties and confers no rights.</P>]]></content:encoded>
    </item>
    <item>
      <title>No post today</title>
      <link>https://docs.microsoft.com/archive/blogs/mike_frieds_blog/no-post-today</link>
      <pubDate>Wed, 13 Sep 2006 15:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Fried]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mike_frieds_blog/2006/09/13/no-post-today/</guid>
      <description><![CDATA[My life has been a little extra busy this week and I've had no time to blog.]]></description>
      <content:encoded><![CDATA[<P>My life has been a little extra busy this week and I've had no time to blog.</P>]]></content:encoded>
    </item>
  </channel>
</rss>