Archive for April, 2010

iFlourish is a personal coaching service.  FSI partnered with graphic designer Michael Meyerowitz to develop a low cost but very elegant custom website.

This site was developed in WordPress from a Photoshop file created by Michael.  Programming included dynamic quotes that can be changed using custom fields.

Even though there are no blogging features, this site is an example how WordPress is an excellent framework to build websites.  FSI programmed the site and Michael populated the copy.

As nice as Excel 2007 is, and much of Office 2007 in general, Microsoft made some annoying decisions with developer access in VBA.

Charts are now Excel objects and their data are based on worksheets.  This is pretty nice overall, but Microsoft does not allow access to the sheet data when pasted into Word or PowerPoint.  So

Also, changes in the chart are not picked up with the macro reader.  So developers can’t use the reader to help figure out the object model and thus write code.

The following routine is one alternative to the macro reader.  Select a chart and then run the module.  It will stop into break mode and then you can set up watches (right click on them to do so) on each of the three objects.  You can select objects (keep the focus on the chart, though) and see the values change.

Public Sub ExploreChartElements()
‘select a chart and then run this, it will break and select various chart elements.. use watches…
Dim oChart As Excel.Chart
Dim oChartGroup As Excel.ChartGroup
Dim oSeries As Excel.series

Set oChart = ActiveChart
Set oChartGroup = oChart.ChartGroups(1)
Set oSeries = oChart.SeriesCollection(1)

Stop

End Sub

As a web developer, I have  evolved into building sites that are an intricate maze of pages that allow the user to surf the site.  The idea is to provide multiple avenues to arrive to each page, which should be short to allow reading without much scrolling.  If the user needs to scroll, build another page.  Pages can be targeted for search engines.

But there are single page websites out there which have their place.  A nice example of this Seven Places Productions, a WordPress implementation with an elegant graphic design.  It is almost a one page site.  They cheat on “our services” by showing examples, which are separate posts.  But they use sliders to allow all the content to be on a single screen.

There are also less desirable solutions.  I shy away from sliders that move a long way, because it tends to make me dizzy.  Think Green Meeting is an example of this.  It is complicated to build, and I need to take seasick pills if I browse the whole site.

A single page site may work well if there is not too much content or too many pages (less than 10).  If graphic design is a premium, this could be a way to go.

I always felt that one page sites would compromise on SEO, but this may not be the case.  I’m not convinced, but Mayur Jobanputra in his blog, gives 6 reasons why one page sites offer advantages for SEO.  I have to believe, however, that a well structured website with many pages, cross-linked, will always do better than a single page site.

For simple sites that don’t need much content, there are creative ways to build a single page site and have it work to your advantage.  One page, however, does not necessarily translate to inexpensive.  The sophisticated graphic design (I particularly like the top right corner peeling away for recent sites) means the single page can cost at least as much as a multi-page site.

Charting is a totally different animal in Office 2007 from its previous 2003- versions.  Charts are not MS Graph objects (by default) but Excel.

Working with PowerPoint in VBA is never fun, because managing slides and the objects on the slides is limited, and can not be seen from the interface (like naming a slide or object).

Usually a major new release makes life easier, but in this case, not so.  Read the following from PPTFAQ:

If you need to automate charts in PowerPoint 2007, it’d be best if you change your name and move to another town where nobody knows that you do PowerPoint programming.

The chart objects you get in PowerPoint 2007 when you add a new chart expose no methods or properties to VBA. In short, you can’t do anything with them in code.

When you install Office 2007, you have the option of including MSGraph, the application PowerPoint used for charts in previous versions. You’ll want this if you need to work with charts from previous PowerPoint versions and/or to create new charts via automation.

These are not encouraging words. I hoped that SP2 of Office 2007 would solve the answers, but it appears that even though we now have access to the chartdata object in PowerPoint and Word, there is virtually nothing we can do with it.

One would think with a major upgrade like 2007, that automation would get easier.  Unfortunately as far as automating graphs in PowerPoint, which is a common need, we are worse off.  So there are several choices, none good:

  1. Configure PP 2007 to default to use MS Graph (see article).  This involves using regedit, and obviously is a poor choice if it will be used by other people since they will all have to do the same configurations.
  2. Use Excel to contain all the graphs and then push them to PP with copy and paste as enhanced metafile.  This is probably the best choice, but pasting into a PP file is always difficult since it is so difficult to manage the objects/shapes in the PP slides.
  3. Use linked graphs in PP to an Excel file as the data source, and then edit the Excel file.  This seems to be buggy, and graphs disappear and act in an unstable way.

So item 2 is the best way, to manage the charts in Excel and push them by copying/pasting them into the slides and locating them.

The trick is that pastespecial returns a shape range, not a shape, so the item(1) at the end returns the first item in the range.  At least I KNOW it will be the first item since I am pasting my object into the slide.

Set oPPTSlide = oPPTFile.Slides(iSlideNum)

Set oPPTShape = oPPTSlide.Shapes.PasteSpecial(ppPasteEnhancedMetafile).Item(1)
oPPTShape.Left = -6
oPPTShape.Top = 164.25

We are unable to edit data underlying the charts.  Check out the posting on an MSDN blog.

Key Differences Between the Chart object in Word 2007 SP2/PowerPoint 2007 SP2 and ChartObject object in Excel 2007 SP2

The Chart object in Word 2007 SP2 and PowerPoint 2007 SP2 does have a few differences from the Excel 2007 SP2 implementation.

* Programmatically creating or manipulating a ChartData object in Word 2007 SP2 or PowerPoint 2007 SP2 will cause Excel 2007 SP2 to run.

* Chart properties and methods for manipulating the chart sheet aren’t implemented.

The concept of a chart sheet is specific to Excel 2007. Chart sheets aren’t used in Word 2007 or PowerPoint 2007, so methods and properties used to reference or manipulate a chart sheet have been disabled for those applications.

* Properties and methods that, in Excel 2007 SP2 normally take a Range object reference now take a range address in Word 2007 SP2/PowerPoint 2007 SP2.

The Range object in Word 2007 SP2 and PowerPoint 2007 SP2 is different than the Range object in Excel 2007 SP2. To prevent confusion, the charting object model in Word 2007 SP2 and PowerPoint 2007 SP2 accepts range address strings, such as “=’Sheet1′!$A$1:$D$5″, in those properties and methods (such as the SetSourceData method of the Chart object) that accept Range objects in Excel 2007 SP2.

* A new object, ChartData, has been added to the VBA object models for Word 2007 SP2 and PowerPoint 2007 SP2 to provide access to the underlying linked or embedded data for a chart.

Each chart has, associated with it, the data used to draw the chart in Word 2007 SP2 or PowerPoint 2007 SP2. The chart data can either be linked from an external Excel workbook, or embedded as part of the chart itself. The ChartData object encapsulates access to the data for a given chart in Word 2007 SP2 or PowerPoint 2007 SP2. For example, the following VBA code displays, then minimizes, the chart data for each chart contained by the active document in Word 2007 SP2:

There is no better example of the custom-template process than this website, which is a WordPress template purchased at Template Monster.

The images were replaced and a custom logo was created by Jenny Vainisi to follow the design of the template.  Templates were dynamically created to allow 1,2 or 3 column pages.

A great small business example of the custom-template process is NYBoat.com, which charters two yachts out of the NYC area for corporate events, weddings and other celebrations.  They needed a image-rich site that showed off their signature yacht, the Royal Princess.

The original template had a nautical theme and was purchased for $55 from Template Monster. The images for the template we complete changed and optimized for the site.  Pull down menus were introduced to accommodate over 100 pages, and a custom logo and header was created, new text colors, etc.

The new site still has the original look and feel but has been improved and customized.

Another great example of the custom-template process is Tender Times, a Doula Service run by Elaine Petrowski.

After determining the basic look and feel of her site, FSI found this template for free, and reconfigured the “mother-earth” template to reflect the colors and imagery of her business.