September 13, 2005
@ 09:41 PM

The PDC keynote was once again way too long. Even though I found it all reasonably entertaining throughout, the sheer length makes it difficult to remember all the individual pieces. The segment where Don Box, Anders Hejlsberg, Scott Guthrie and Chris Anderson put an app together with LINQ was fabulous and refreshingly free of marketing lingo, while, and in sharp contrast, the rep from the company Northface was difficult to listen to, to say the least (even though they had a cool demo).

The Anders/Chris/Don/Scott demo was the highlight for me; the "low point" was probably (and rather unfortunately) the "Netflix" demo, which was supposed to be a demo of the cross platform story for "Windows Presentation Foundation Everywhere" (WPF/E), but turned out to be "just" 3 similarly looking, but different implementations of similar apps using similar visuals (one WPF, one Media Center and one for PocketPC) and the immediate reaction of the folks around me was "so what?". One more thing that I found a bit unfortunate was that every WPF demo stressed how "super easy" it was to do all those 3D effects and animations. After having played around with WPF/Avalon quite a bit in the past few weeks I can say that I can do lots of very cool things that were out of reach for me before, but "super easy" isn't exactly what I would call the current "hack it up in XML" development experience. Maybe they've been using tools that I don't know anything about yet.

Categories:

September 12, 2005
@ 04:49 PM

I am in Los Angeles for PDC05 and I am staying at the Renaissance Hollywood Hotel. Why is that interesting? Well, because …

Someone at that hotel is apparently thinking that it is a brilliant marketing idea to put little (live) fish into tiny bowls into the guest rooms along with a note that you might want to try out their room service (the note says that you don’t have to feed the fish because the chef is doing that and the chef wants to prepare something for you too). I think that’s a really, really bad idea and it’s pretty cruel. I think I need to talk to the hotel manager there. Save the fish!   

 

Categories:

September 9, 2005
@ 09:10 AM

Now here is an unlikely blog post! Clemens writes VBA snippets for PowerPoint!

There’s one problem that bugs everyone who is doing lots of presentations with PowerPoint at conferences and has to adjust the slides to whatever the respective conference’s PowerPoint template is: Color Schemes. Color Schemes are quite nice when you are in control of whatever your templates are, but if you must comply with someone else’s taste for color combinations or their complete ignorance about the color scheme, you might end up spending hours re-coloring your presentation’s graphics, because whenever you import or copy & paste graphics between presentations, the graphics adopt the destination’s color scheme. Here’s how that might end up looking:

 

Bah! I have tons of very complex graphics with animations that evolve over time (and reuse) and re-coloring the slide I am showing here would take quite a bit of time. And – really – green and light gray on dark gray with light gray text on white isn’t exactly “best practice” when it comes to presentations.   

What causes this is that PowerPoint will, by default, assign the “color scheme index” to the fill and line colors of any shape if you pick the colors from the existing color scheme (and the UI is designed to make you do that). This index information takes precedence over any explicit RGB value set for the shape’s fill or line or text color. So whenever you move the shapes to a different presentation, they will adopt the color scheme setting. Luckily, and that’s something I found out yesterday because I found myself once again in the situation to have to fix a deck, it’s possible to break that link between a shape’s coloring and the color scheme by programmatically modifying the respective ColorFormat element and resetting the SchemeColor so that it doesn’t refer to one of the  preset color scheme “slots”. Below is the resulting VBA macro for PowerPoint (yes, it cost me great pain to go there) that’ll simply replace the color-scheme index information on any drawing shape so that colors of shapes (the macro ignores text) will be completely preserved as you copy stuff between presentations. Put that into the source presentation and run StripSchemeColorFromShapes() once.

Sub StripSchemeColorFromShapes()
    Dim currentShape As Shape
    Dim currentSlide As Slide

    For Each currentSlide In ActivePresentation.Slides
        For Each currentShape In currentSlide.Shapes
        If currentShape.Type = msoGroup Then
            RecolorGroup currentShape.GroupItems
        Else
            RecolorShape currentShape
        End If
        Next currentShape
    Next currentSlide
End Sub

Sub
RecolorGroup(group As GroupShapes)
   Dim currentShape As Shape

   For Each currentShape In group
      If currentShape.Type = msoGroup Then
          RecolorGroup currentShape.GroupItems
       Else
          RecolorShape currentShape
       End If
   Next currentShape
End Sub

Sub RecolorShape(currentShape As Shape)
    Dim clr As ColorFormat

    On Error Resume Next

    If currentShape.Fill.Visible Then
        Set clr = currentShape.Fill.ForeColor
        clr.SchemeColor = ppSchemeColorMixed
        currentShape.Fill.ForeColor = clr
        Set clr = currentShape.Fill.ForeColor
        clr.SchemeColor = ppSchemeColorMixed
        currentShape.Fill.BackColor = clr
    End If

    If currentShape.Line.Visible Then
        Set clr = currentShape.Line.ForeColor
        clr.SchemeColor = ppSchemeColorMixed
        currentShape.Line.ForeColor = clr

        Set clr = currentShape.Line.BackColor
        clr.SchemeColor = ppSchemeColorMixed
        currentShape.Line.BackColor = clr
    End If

   On Error GoTo 0
End Sub


Once I ran the macro in the original presentation, all I had to do was to copy & paste it into the destination and see there! Done:

Categories: