Yes… you read it right!
Many people talk about Azure, HTML5, SilverLight, WindowsPhone 7, SharePoint etc. How many are talking about VSTO? Compared to other technologies, people who on talk on VSTO might be very less. But, the fact is that VSTO will exist and grow as long as there is a product called Microsoft Office exist!
Many people suggested me to retire from VSTO and choose some other technology as there is not much focus on it. But, VSTO is installed in my mind without ‘Uninstall’ option. Though I work on other technologies like Mobile Apps, ASP.NET etc., I always explore more about VSTO and love to get updates of it.
Actually, VSTO is not that bad as people think. It has very good features which address some issues which can’t be solved by other technologies. Some of the new features on Office 2010 like Backstage View, Ribbon Enhancements, Programmability refinements etc extends the programmability and make it ease.
When I have started working on VSTO, it is not shown in web search results (Bing or Google) until it is typed correctly. But now, we have got many Video and Text Tutorials, Blogs, MSDN Library, exclusive forums to each office application and lot many. There is a lot of development in VSTO since last two years compared to before.
I thought to write a post on this after reading Ridi’s post – Is VSTO Dead?. Thanks Ridi!
Ridi recently spoke at Microsoft Innovation Roadtrip and delivered several points on why Office programming is still valuable to give another benefits in organization productivity. He has shared few presentation decks on VSTO. Here is the Live Spaces link for it – http://bit.ly/lgXTk9
You can find Screen Casts, Tutorials and some downloadable content about VSTO 2010 here.
Following code works fine in Exchange 2003 and 2007. But fails in Exchange 2010, that too in Online Mode. There is an interesting discussion that happened recently in MSDN Forums on this topic. Just would like to share summary of it so that it will be helpful to them who are in need of it.
As of now, there is not work around, except changing mode of Exchange to Cache Mode. Some told that Microsoft is aware of this issue and working on it. A fix may be released with the next patches.
const string TEST_PROPERTY = @"http://schemas.microsoft.com/mapi/string/
const int TEST_VALUE = 9;
application = new MSOutlook.ApplicationClass();
propertyAccessor = email.PropertyAccessor;
object objValue = propertyAccessor.GetProperty(TEST_PROPERTY);
Here is another work around suggested by Joel…
“it looks like the it’s not completely resolved by simply using extended MAPI. I was trying to use IMAPIProps::GetProps() and specifying a single property tag with the ID specified, but the type not specified (using PT_UNSPECIFIED). As already noted, this works fine with Exchange 2007 online or cached mode, Exchange 2010 in cached mode, but not in Exchange 2010 online mode.
The workaround in this case is to specify the correct property type. But, since the managed PropertyAccessor.GetProperty() method does not know what the property type is ahead of time (at least for custom properties), I guess that could be why it’s failing. What I’m doing now is calling IMAPIProp::GetPropList() and finding the entry with matching property tag. Since GetPropList() returns the property type as well, I can now call GetProps() with the correct property type. This seems to work in Exchange 2010 online mode :)”
I think this is the simplest of all (which is suggested by Susanne Kapp via Wompi)…
For an easy workaround in VSTO, you can simply call the mailItem.Save() method after setting the property. But be aware of all the mails getting saved to your drafts folder if you don´t send the mail.
Hope this helps!
We are pleased to announce Tech∙Ed on the Road, where we put together the best sessions from Tech∙Ed India 2011 is scheduled on 22nd May, 2011 at Hyderabad. Thise event is not only about content and sessions – they also provide an opportunity for you to interact with and have your questions answered by the very people who work on these technologies day-in and day-out, and who can help you plan the features and architecture to support your business goals.
The content for this event will be targeted towards Software Developers and IT Professionals. Focus will be on technologies like ASP.NET MVC3, HTML5, Database, Internet Explorer 9, Windows 7, Web Platform, and Windows Azure.
Avail of these FREE Learning Opportunities and REGISTER for this exclusive series of events today.
Here is the agenda!
For more details, visit: http://communitytechdays.com/agenda.aspx#hyderabad
Date: 22nd May, 2011
Target Audience: Software Developers & IT Professionals
Microsoft R&D India Pvt. Ltd.,
MPR 1-5, Building 3,
Deployment alone is a hassle for VSTO Developers, especially beginners. In this, if one needs to deploy add-in in a 64-bit system is hectic. Here is a simple solution that I have used to debug and deploy add-ins in 64-bit Office.
You just need to follow these steps.
By default, the add-in will be registered with the respective office application. This is enough to run the application in debug mode. If we select ‘my add-in should be available to all users…’ option, it registers the add-in in the 32-bit global registry. This can be seen in RegEdit like this.
But, 64-bit Office cannot see registries in this location. For the add-in to load correctly, the registry keys should be moved to the following location.
For deploying the application…
In Visual Studio 2010, you just need to update the TargetPlatform property to x64 in the Setup Project Properties. Your project is ready to be deployed in 64-bit versions of Office now!
If you are working on Visual Studio 2008, there is a bug in setup project which prevents the add-in from registering 64-bit COM components. A work around is suggested for this problem in Cannot load 64-bit self-registering DLL’s section in Troubleshooting Windows Installer Deployments article in MSDN. It describes how to manually write 64-bit registry keys for making your add-in to work in 64-bit Office.
For more details, go through this article: Deploying COM Add-ins for 64-bit Office using Visual Studio