Whilst passing my golden years away at a certain large Continuus
client, a purgatory with no end in site, I took it upon myself a project to
keep from going stir crazy and possibly harming myself and others. I had already
done the fun stuff specifically for the client (to be documented later on a
rock which I am tentatively labeling "Bill and Ed's XML Adventure").
As usual, the Windows side of the house were bitching and moaning about our
lousy thick client Gui. You know the usual complaints:
The new Java client addresses a number of things, but...
We have integrations with a number of developer enviroments, but NOTHING, for the real numbskulls who need it the most... the Microsoft Office users, the managers writing specs, the graphic artistes who just about know how to start up Photoshop or DreamWeaver and little else.
Well okay... we have ccmbar. Big deal. You drag something up to it and throw it over the wall. You still need to use the thick client to figure out what really happened. Mark Morrisey (a ghost from the past) made a good first shot with it at making life easier for users with the bar, but he wrote it long before the ccmlib integration library was fully functional. Somebody knowing a little VB or VBA could actually attempt to use ccmbar's controls to develop an integration of sorts within an Office or other program, but no-one in the ivory tower in Irvine actually bothered to do anything further. The entire world was going to switch to a Web paradigm within months. Thick clients would go away. Microsoft would be broken up. COM would die at the foot of JavaBeans. Pigs would take wing!
So large client asks Ed one day whether or not we could write a little something that would update the header information in their specifications documents based on the CM Synergy version. Ed plays a little with the custom document properties collection in Word and decides that it would be pretty easy to do an updatable field code, much like the document "date" macro. I cobbed together a macro pretty quickly using the brain dead VBA "Shell" method and a bat file passing the output from a ccm dir of the document file name back for processing. No big whoop, and it's pretty ugly. So then, one Monday morning as I'm in semi-zombie state winging my way into O'Hare on the 6:30 AM early bird I get the itch to play with good ole ccmIntgrAPI. As you may recall, I am one of the original folk to blame for the VSS migration tool (but please to shoot Windows consultant hired after me who bolluxed it all up again and then wouldn't let me have the source).
Next thing I know, I'm looking at an ActiveX Control set, adding one form after another as well as a few methods. On the office side I create a couple of forms, some macros and bang... a full blown integration springs into existence. PowerPoint, Excel and company will come later without much additional effort.
There's actually three pieces to play with: barfly the controls, barkeep a standalone exe for running barfly, and barword the classes and macros to go into your Word's normal.dot file. When you unwrap the zip, you will see the three directories. If you rebuild from source, build barfly first to get a new barfly.ocx file. Copy that to your Windows system32 directory. Then build barkeep or setup your normal.dot file.
Barkeep just shows a form with the barfly controls on it. Eventually I'll figure out something else for it to have it live unobtrusively on the desktop or in the task tray.
I'm also still figuring out how to automate the installation of the word macros and setting up the buttonbar for Word. Plus Office 2000 has the new macro paranoia mode where you have to turn down security to get anything to run. Otherwise you have to go get your stuff "signed" by the boys in Redmond. After getting into Office 2000 go under tools->macro->security and turn it down to low. Then get into the Visual Basic Editor and import the three source files from the barword directory: cmsynergy.bas, frmbarfly.frm and frmcmprops.frm. Hit the save button to save your normal.dot. You can close VBA now if you want. Go back to Word and run tools->Customize.
Under the toolbars tab, pick new to create a new toolbar and call it cmsynergy or whatever. Drag it up to the coolbar section at the top of the Word document. Then go to the commands tab and select the macros under the categories. On the right you should see listings for normal.cmsynergy.somethings. Drag each one up to the new toolbar and arrange to taste. You can do a right button on each new button and select the textonly (always) setting and then rename the Name appropriately. Your normal.dot should save the new toolbar automatically.
There's tooltips everywhere. You can drag and drop a file or directory from Explorer to a number of things (to set project by workarea, look at props for a file etc.). When you pop off an Explorer or cmdline from the project panel, you are put into the workarea. The command line also has CCM_ADDR set conveniently to use the session. You may want to leave the thick gui unselected on startup to make things much faster, but I have yet to code up a treeview browser for the workareas. I'm also still brainstorming how to implement a graphic history view.
When you bail out of Word or kill off the barkeep, the controls and macros should catch the terminate event and do a shutdown first. If something screws up, you might see an orphan ccm.exe running in task manager which will be eating up your cpu. Just end the process. Otherwise you can hit the stop button first before shutting things down.