Andrew Coates ::: MSFT

It's all about community!

  • Andrew Coates ::: MSFT

    Thoughts and Links about the Ecma Office Open XML Formats

    • 0 Comments

    While on the Ready tour, I've had lots of interest about the session I'm doing on the Ecma Office Open XML Formats. There have been some great questions from the audience, both during the session and afterwards via this blog. In response to those (and for my own interest), here are some answers and some links.


    Steve Kay asked:

    I have installed the file converters on my box running Office 2003.

    I can read & write Office 2007 docx files, but cannot create Excel xlsx files from within Excel.  It isn't available from the 'Save As' dialog within Excel.

    I can use 'Save As' from windows explorer to convert 2003 xls files to the 2007 xlsx format, but when opening with Excel it gets converted to 2003 xls format and again I cannot save as 2007 format.

    Is it meant to work this way?

    No, it's not meant to work that way, but you do need to make sure you read the instructions on the download page for the compatibility pack. In particular, this bit:

    Ensure your system is up to date by installing all High-Priority/Required updates on Microsoft Update (required for Microsoft Office XP and 2003 users).

    This article discusses the updates required in more detail.


     The OpenXMLDeveloper.org blog is a great resource. In particular, I found these posts useful:

    MSDN Articles on Open XML and Related Topics - heaps of really good pointers to info.

    Working with Open Packaging parts - great article on the structure of the formats themselves which, by the way, includes the XPS format as well as the office formats.

    Content Control Toolkit - link to a project on CodePlex that allows you graphically link content in a Word document to custom XML in the document (see also Gary Sharp's info below)


     Gary Sharp came to the sessions in Melbourne and then sent me a couple of follow-ups via my blog:

    I spoke to you after the session – mentioning my interest in being able to store a custom dataset (xml) within a word document and then referencing it into the document.

    After returning to work and doing some research, I've found the mechanism you were speaking about. Namely: Xml files stored in the CustomXML folder inside the package. The contents of these files can then be referenced to "Content Controls" within a document. While I was extremely impressed by this technology (and it will no doubt appear in several applications I contribute to), I was a little disappointed that there seems to be no UI (inside the Word client itself) to be able to make these mappings.

    I was hoping for something similar to the “Insert Merge Field” picker (although more advanced) made available to the Mail Merge feature. At the very least, I was expecting something similar to a “Field” so that (with training) the end user could configure where the content appeared in the document.

    I was wondering if you knew of any ways to do this (other than programmatically modifying the document xml file). For example, could a (daren’t I say) macro be used? Might office contain this UI in final release?

    See comments:

    http://blogs.msdn.com/modonovan/archive/2006/05/23/604704.aspx

    Resources:

    http://openxmldeveloper.org/articles/463.aspx

    http://openxmldeveloper.org/articles/Mapping_Content_Controls_to_Custom_XML_Parts_using_Notepad.aspx

    I'd really appreciate your thoughts.

    And then he answered his own questions:

    I just wanted to pass on a note to say that after much 'wondering' and exploring I found more than enough information on CustomXML documents and their capabilities (Didn't want you to double-up on my work...).

    I now understand the reasons why a GUI for Mapping XML to Content Controls wasn't created.

    Below are some links which I found invaluable:

    http://blogs.msdn.com/frice/default.aspx - For manipulating the Office Ribbon UI

    http://msdn2.microsoft.com/en-us/library/ms406053.aspx - For creating templates programmatically (and thus Content Controls)

    http://www.codeplex.com/Wiki/View.aspx?ProjectName=dbe - Word 2007 Content Control Toolkit (absolute must-have)

    http://channel9.msdn.com/ShowPost.aspx?PostID=254520 - Content Controls Intro (Toolkit demo)

    http://openxmldeveloper.org/articles/463.aspx - Creating CustomXML Documents (via Packaging API)

    http://openxmldeveloper.org/archive/2006/06/04/Mapping_Content_Controls_to_Custom_XML_Parts_using_Notepad.aspx - Content Controls to CustomXML (via Notepad)

    Don't know if any of this will be useful to you - but I thought I'd pass it on (seeing it took me a while to sort the good from the bad).

    Cheers,

    Gary Sharp

    Thanks Gary.


    And finally, Mitch sent me

    An interesting perspective on why the new office document formats are good:

    http://www.popularmechanics.com/technology/industry/4201645.html?page=3

  • Andrew Coates ::: MSFT

    Windows 7 on my Mac Mini

    • 5 Comments

    Back in the day, Dave and I bought (intel) Mac Minis (there was a retail outlet which had apparently decided to stop selling them and they were going pretty cheap). It’s been my main Vista machine at home for 18 months or so now (running bootcamp), I never boot into OSX, the machine was a member of my SBS domain and all was well with the world. Of course, I just can’t leave well enough alone (in addition to the fact that I’d “wasted” 40 of the 80GB HD on an OSX partition that I never use). I decided to take the plunge and see what the Win7 experience was like.

    First I tried an upgrade – running setup.exe from the DVD and choosing the upgrade option. Initial results were poor because of a lack of drive space on the Win partition,  but even after getting the available space up to 10GB (lose VS, Office and some games), the setup would get most of the way through and then just roll back. By the way, the rollback experience is great – there’s nothing left of the install afterwards except a note on the desktop as to what’s gone wrong – Vista is as it’s always been.

    Today I took the plunge and started a clean install.

    I inserted a Win7 x86 beta DVD, shutdown Vista, held down the alt key and turned the Mini on. After some time (after I released the alt key), the mac boot screen came up offering to boot from either of the partitions on the hard drive or the DVD. I chose the DVD and the rest was exactly like any other Win7 install experience I’ve had to date, that is to say seamless. Within 30 min I was at a Win7 desktop starring the Beta fish and was informed that Windows was already 65% of the way through downloading 4 updates. One more restart and I was in business.

    There are three devices showing up as problems in Device Manager, one USB device, the TPM and “Performance Counters” in the Other Devices node.

    No mucking around with bootcamp drivers, none of the insidious Apple updates.

    Next, I downloaded and installed Windows Live Essentials, and then I’ll do the rest of my standard install stuff – Office2007, VS2008, Acrobat Reader etc.

    Win7 Beta on Mac Mini – Big Thumbs-Up from me.

  • Andrew Coates ::: MSFT

    Virtual Earth - Now available for Commercial Use

    • 10 Comments

    Steve Lombardi’s VE Session has just finished and contained some cool announcements.

    Now available for commercial use.

    First and foremost, VE is now available for commercial use. The nitty-gritty details are available from the virtual earth developer site (www.viavirtualearth.com) but, in essence, if you leave the What and Where fields visible, you can use the control provided for a commercial site for free. In Jan 2006, there will be an option to pay for use and remove those controls.

    Steve’s working on a demo site for this technology called www.MyFavouritePlaceOnEarth.com – catchy huh? It’s not live yet, but when it is, it’ll allow you to mark a spot anywhere on the earth (or, more accurately at the moment, anywhere in the continental US) as a “significant site” and decorate it with the metadata to say why.

    More info on current features

    Steve explained how the Locate Me feature works. It finds all of the WiFi hot spots it can (whether or not it can connect to them) and their signal strength. It looks up their MAC address on a database they have server-side and does a triangulation to work out your location to within “50 to 100 feet”.

    There was another feature of the current release that I hadn’t twigged to – the ability to email or blog from your scratch pad. Check it out. It’s pretty neat.

    Beta 2 – Coming Soon

    I mentioned above that the data are only available for the US. This one of the things that will be remedied in the next release (called beta 2 and due out “this fall”). The new features of VE in this release that Steve disclosed today are:

    • Eagle Eye image view – photos taken from fairly low altitude at a 45° angle (as opposed to the 90° that the imagery currently uses). This makes for a really neat perspective view.
    • User pushpins and collections
    • Improved aerial and satellite imagery (of the 90° kind)
    • Driving directions
    • New content types – Traffic, Movies etc
    • Mobile – send to phone. This looks like you’ll be able to send details of a location or locations to your mobile (or someone else’s). Imagine being able to send a “meet me here …” SMS.
    • The big one (for me) is the geographic expansion – currently planned to be England and perhaps some more of Europe. More and more data will come on line as the team source and massage the data.

     VE and MapPoint Web Services – better together

    Today, VE and MWS are a great team (geolocate and address with the MWS API and chuck it up on VE, for example). In January, it will be even easier to combine their strengths as they will pretty much be merging around the time of MWS 4.0.

    Useful Sites

    www.virtualearth.com

    www.viavirtualearth.com – check out the gallery of VE applications

    http://www.viavirtualearth.com/MyVirtualEarth/MapControlTest.html – this is a testbed where you can play with the whole VE API. Well worth a look.

     

     PDC2005

  • Andrew Coates ::: MSFT

    VC# Express Beta2 and MapPoint WebService (oh man!)

    • 10 Comments

    I'm currently working on an article introducing C# Express edition for one of the local developer magazines and my plan was to take the ScreenSaver example that ships with the product and extend it a little. In particualr, I wanted to introduce the concept of calling web services. Instead of using a folder with images as the background for the screensaver, I wanted to pull down a map centred on an address that the user entered into the options dialog (and then verified via MapPoint's FindServiceSoap service).

    So, I added a reference to the MapPoint wsdl and away I went. Things started getting strange when I called the service. In particular, I'd get an exception:

    Server did not recognize the value of HTTP Header SOAPAction:
       http://s.mappoint.net/mappoint­-30/FindAddress. 

    Long story short, what it looks like is happenning is that the WSDL generator that generates reference.cs is not handling the fact that MapPoint has 4 services defined in the WSDL (Common, Find, Render and Route), that is to say, it's kind of recognising the fact in that it generates stubs for all of those services and their methods and data types, it just gets it wrong.

    Each of the services needs a separate URL to call the methods, but the code just seems to use the first one it finds in the WSDL (in this case, the URL for the Common service) . There's only one entry in the Settings where there should be four and the Reference.cs code only uses that one setting.

    To fix this manually, add the following settings to the Settings.Settings (You'll obviously need to change ScreenSaver1 to the name of your project, or call it whatever you want, as long as you reference it correctly in Reference.cs)

    Name Type Scope Value
    ScreenSaver1_net_mappoint_staging_FindService (Web Service URL) Application http://findv3.staging.mappoint.net/Find-30/FindService.asmx
    ScreenSaver1_net_mappoint_staging_RouteService (Web Service URL) Application http://routev3.staging.mappoint.net/Route-30/RouteService.asmx
    ScreenSaver1_net_mappoint_staging_RenderService (Web Service URL) Application http://renderv3.staging.mappoint.net/Render-30/RenderService.asmx

    Now open up Reference.cs (easiest way to do this is to right-click on one of the web service objects and choose Go To Definition) and fix the settings for each of the 3 services

    public RenderServiceSoap() {
       this.Url = ScreenSaver1.Properties.Settings.Default.ScreenSaver1_net_mappoint_staging_CommonService;

    becomes

    public RenderServiceSoap() {
       this.Url = ScreenSaver1.Properties.Settings.Default.ScreenSaver1_net_mappoint_staging_RenderService;
    public RouteServiceSoap() {
       this.Url = ScreenSaver1.Properties.Settings.Default.ScreenSaver1_net_mappoint_staging_CommonService;

    becomes

    public RouteServiceSoap() {
       this.Url = ScreenSaver1.Properties.Settings.Default.ScreenSaver1_net_mappoint_staging_RouteService;

    and

    public FindServiceSoap() {
       this.Url = ScreenSaver1.Properties.Settings.Default.ScreenSaver1_net_mappoint_staging_CommonService;

    becomes

    public FindServiceSoap() {
       this.Url = ScreenSaver1.Properties.Settings.Default.ScreenSaver1_net_mappoint_staging_FindService;

    I'm sure this will be fixed during the Beta process.

    Hope this helps some folk.

  • Andrew Coates ::: MSFT

    Finding the Windows dpi setting in .NET

    • 2 Comments

    I had a note from Stephen Lead (of Ignite Spatial fame) asking how to determine the dpi setting a user has selected in Windows. He pointed me to the only MSDN article he could find on the subject, ironically explaining how to do it in Visual FoxPro. I didn’t know off the top of my head, generally you don’t have to worry about this in .NET because the framework is DPI aware and automatically scales your controls (you can control this with the ContainerControl.AutoScaleMode property). Stephen was setting the form’s height and width explicitly in code and wanted to be able to figure out what those values would be.

    After some searching, I found out how to do this. All objects that inherit from System.Windows.Forms.Control inherit the CreateGraphics method which returns a System.Drawing.Graphics object for the control. The Graphics object has DpiX and DpiY properties which give respectively the resolution of the screen in dots per inch horizontally and vertically.

    This means, for example, that you can grab the resolution in the form load (VB):

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Using myGraphics As Graphics = Me.CreateGraphics()
          MessageBox.Show(String.Format("Resolution X: {0} dpi, Resolution Y: {1} dpi", myGraphics.DpiX, myGraphics.DpiY), _
                          "Windows Resolution")
       End Using
    End Sub

    or in C#

    private void Form1_Load(object sender, EventArgs e)
    {
        using (Graphics myGraphics = this.CreateGraphics())
        {
            MessageBox.Show(String.Format("Resolution X: {0} dpi, Resolution Y: {1} dpi", myGraphics.DpiX, myGraphics.DpiY),
                            "Windows Resolution");
        }
    }

    Either way, on my system this results in

    image

    Note that this works in the .NET Compact Framework as well.

    Updated to include disposal of Graphics Object

  • Andrew Coates ::: MSFT

    SQL Server 2008 Readiness Events in Australia (and heaps more technologies too)

    • 1 Comments

    Greg beat me to it.

    The Australian Partner Readiness site has three great SQL2008 sessions listed

    But that's just the start of it.

    Check these out:

    There are sessions in Perth, Sydney, Melbourne, Brisbane, Canberra and Adelaide (not all events are in all cities)

  • Andrew Coates ::: MSFT

    VFP 9.0 release date

    • 11 Comments

    This morning, in the OzFox keynote, Ken Levy stated that the release date for VFP 9.0 is scheduled for December 15. I'm not sure if this is new news (it didn't sound like it when Ken announced it), but it's the first time I've heard a public release date.

    If you want to be able to get your hands on VFP as soon as it's released, you'll need to be an MSDN subscriber. It usually takes about 6 weeks after RTM for the full packaged product to hit the shelves.

  • Andrew Coates ::: MSFT

    NewsGator and VSTO Outlook Add-ins Do Mix Now

    • 2 Comments

    This morning, I posted this note saying that Newsgator and VSTO2005 Outlook add-ins can't coexist, and for that reason I had the NewsGator add-in disabled so I could develop VSTO add-ins. In the meantime, I enabled Newsgator again to get a feed fix. One of the posts was from NewsGator saying they'd released a SP. I was running 2.5.9.xx and this upgrades the version to 2.5.11.xx. One feature they mention in this post is .NET 2.0 compatability.

    Happy to report I can now run both my VSTO2005 Outlook add-ins and NewsGator. Way to go guys!

  • Andrew Coates ::: MSFT

    TechEd Sessions Posted and some useless Stats

    • 2 Comments

    Sessions Posted

    The first pass of the sessions at have been posted and if you're a delegate you can login and vote for your favourite sessions (to help us with timetabling and room allocation). Your votes will be automatically migrated to your agenda when we finalise the time and room stuff.

    If you're not yet registered (better hurry up, see below), you can still see the session catalogue which will continue to be filled in as more information is finalised.

    Netbooks

    I was away when we announced this and I missed out on the fun of the frenzy as news got around. In case you missed it too, we announced that we're giving (yes giving) each paid delegate an HP MiniNote 2140 running the latest build of Windows 7 (and a bunch of other stuff). Captain of the NetBook ship, Nick Hodge has lots more info. He's also calling for suggestions from you as to what we can do with these to really make the experience a ripsnorter.

    Great new Blogs

    While on the subject of blogs:

    Both well worth a read.

    Twitter

    There's a Twitter account, @auTechEd, for all the breaking TechEd Australia news, and the hashtag for other people talking about TechEd is #auteched.

    There is a whole bunch of other social networking options on the TechEd Connect page.

    Useless Stats

    And now for some Excel fun. As I alluded to above, things are going very fast on the registration front (see the curve below) and if you're thinking of going to TechEd, now would be a good time to register (of course, if you're a member of a user group, you may want to chat to your User Group leader before you pay full price, or even the Early Bird price – 'nuf said).

    Ticket sales as a percentage of tickets sold to date

    This means that I've got a lot more stats to play with than I had last time I posted about this stuff.

    Percentage of delegates by State

    QLD 28.23%
    NSW 23.52%
    VIC 20.70%
    ACT 11.42%
    SA 6.65%
    WA 5.24%
    TAS 2.55%
    NT 0.67%
    (blank) 0.54%
    NA 0.13%
    TAURANGA 0.13%
    AUCKLAND 0.07%
    KAITAIA 0.07%
    WAIGANI 0.07%

    Top 10 Names

    David 3.70%
    Michael 3.23%
    Chris 2.22%
    Paul 2.15%
    Peter 2.08%
    John 2.02%
    Andrew 1.95%
    Mark 1.81%
    Matthew 1.61%
    Richard 1.55%

    By the way, the first lady's name comes in at equal 55th

    Simone 0.34%
    Neil 0.34%
    Carl 0.34%
    Jamie 0.34%
    Ray 0.34%
    Aaron 0.34%
    Russell 0.34%
    Brad 0.34%
    Shaun 0.34%
    Timothy 0.34%
    Glen 0.34%

    Countries Represented

    AUSTRALIA 98.86%
    NEW ZEALAND 0.60%
    PAPUA NEW GUINEA 0.13%
    (blank) 0.13%
    FIJI 0.07%
    SWEDEN 0.07%
    SRI LANKA 0.07%
    PAKISTAN 0.07%
  • Andrew Coates ::: MSFT

    Great article on Active Directory, ADAM and System.DirectoryServices

    • 0 Comments

    I got sidetracked today on some Active Directory stuff and came across this great article by Klaus Salchner entitled LDAP, IIS and WinNT Directory Services. It also talks a fair bit about ADAM - Active Directory Application Mode.

    Well worth a read.

    Update

    Tristan also just found me a great MSDN article on enumerating the members of a group using System.DirectoryServices. Much nicer than the one I found that uses VBScript.

Page 2 of 47 (470 items) 12345»