There are now two distinct ways to program Office. Tim Anderson explains.
The Visual Basic editor in Office 2000 is disappointingly similar toains. the one in Office 97, until you try a little magic. The functionality is hidden from end-users, but Tools/
Customize in an application like Excel lets you add an Insert Script command. Select it, and instead of the Visual Basic environment, the new Microsoft Development Environment appears, as seen in Visual InterDev and Visual J 6.0. Your spreadsheet is there but in the form of XML and HTML code. The toolbox has standard and ActiveX HTML controls, and you can use scripts and dynamic HTML to enliven your Office web document.
Scripts can run on the client or the server. The snag is that the new scripts don't run in old Excel, so developers must take a decision. Is your new custom Office 2000 solution going to be primarily intranet-based, using the features of the Office Server Extensions along with standard web techniques? Alternatively, old-style VBA development still works, and better than before thanks to VBA 6 which uses the same runtime as the full Visual Basic 6. In this case, the problem is reversed, since normal VBA macros do not run when Office documents are viewed as web pages.
It is not going to be easy, the consolation being that if the document is edited using Office tools, both kinds of scripting will be preserved.
Looking at the web model, there are a host of development possibilities.
Anything you can do with Active Server Pages or Dynamic HTML can be done in an Office document, too. Data Access Pages are a feature of Access 2000 that provide the easiest way yet to create fully scriptable web pages with dynamic data links. Data access is via ActiveX Data Objects, a COM-based technology which works well with remote data, unlike Data Access Objects used in previous versions.
Old-style VBA in Office
Office 97 was a breakthrough for developers, providing Visual Basic for Applications, complete with forms and class modules, into all the Office applications except Outlook. Outlook 2000 still lacks VBA, making do with cut-down VB Script.
Conversely, FrontPage 2000, part of the high-end version of Office, does now get VBA. A key change concerns add-ins; code libraries that add new functionality to Office applications. In previous versions these have little consistency, being disguised Excel workbooks, Word templates, or special dynamic link libraries created with a C++ compiler. Outlook 97 was the worst, requiring developers to delve into the depths of the Exchange API to create an Exchange Client Extension. Office 2000 still supports these methods, but in addition there are COM add-ins, essentially COM servers which are hooked seamlessly into the host application. You will be able to create these with Visual Basic, using the same techniques for all the Office applications including Outlook. Another improvement is that code modules can be digitally signed to prevent the spread of macro viruses.
Using a little magic
Microsoft Office has an indirect effect on Windows developers, by introducing new standards which users then expect in other applications. Two examples in Office 2000 are HTML help and the Windows installer. The old Windows help compiler converted Rich Text Format documents into help files read by various versions of Winhelp, the familiar help viewer. New HTML help compiles HTML source code into .CHM (compiled HTML). Developers can now use the same skills in building online help when creating web pages, and users get better readability with the web. Office developers can also customise the install scripts to create versions that both limit and extend what gets installed, for smooth deployment of an Office solution.
Full developer features are likely to be only in the Office Developer Edition, which will also include a runtime version of Access 2000 for deployment.
Related articles
Q.Why are some of the keys on my keyboard doing strange...
Q.Is my phone’s Bluetooth any use?
Q.Can I switch boot drives so that I can work on older...
Old Street roundabout is being touted by the Government as the UK's answer to Silicon Valley, but it seems our best innovations are coming from all over the UK
|
|
|
|
|
Computeractive Excel (2010) Online tutorialPrice: £19.99 |
Computeractive Word (2010) Online TutorialPrice: £19.99 |
Computeractive Powerpoint (2010) Online TutorialPrice: £19.99 |
Angry BirdsPrice: £9.99 |
Back Issue CD-Rom 14 (2011)Price: £15.99 |