vsto

Expose VSTO functionality to VBA w/o local admin

你说的曾经没有我的故事 提交于 2019-12-06 08:15:25
What would be the best way to expose certain functionality in a Dotnet VSTO Excel add-in to VBA, without requiring the user to be a local administrator (i.e. no COM registration, no HttpListener )? Would it be possible to use Microsoft Message Queues from VBA? If I may interpret your question as broadly as "How do I expose functionality in a .Net assembly to Excel without COM registration" then an excellent solution is to use Excel's XLL interface. Basically one deploys an xll shim and an associated .Net dll. When the xll is loaded it reflects over the dll and exposes the functions therein to

OpenSharedItem for opening .MSG files showing Error in Outlook C#

一世执手 提交于 2019-12-06 07:20:21
I am using the following code to open the signed/unsigned Outlook messages and I display the content in WebBrowser control. Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application(); var item = app.Session.OpenSharedItem(msgfile) as Microsoft.Office.Interop.Outlook.MailItem; string message = item.HTMLBody; app.Session.Logoff(); It is working fine for the first time the file is opening, but after closing the Outlook file trying to reopen the file it showing the following error: "Cannot open file: C:\tion.msg. The file may not exist, you may not have

PR_INTERNET_MESSAGE_ID returns blank when sending message

 ̄綄美尐妖づ 提交于 2019-12-06 06:37:10
I'm developing add-in for Outlook 2013,I'm struggling with PR_INTERNET_MESSAGE_ID , I could easily get PR_INTERNET_MESSAGE_ID on archiving incoming mails, but it returns nothing on sending mail. Any help would be appreciated! Thank you! here is my code string PR_INTERNET_MESSAGE_ID = "http://schemas.microsoft.com/mapi/proptag/0x1035001F"; Microsoft.Office.Interop.Outlook.PropertyAccessor pal = mailItem.PropertyAccessor; string Internet_Message_Id = pal.GetProperty(PR_INTERNET_MESSAGE_ID).ToString(); That property is only sent after the message is sent. Exchange 2010/2013 sets that property for

VSTO - MS Office 'Color Scheme' changed event

混江龙づ霸主 提交于 2019-12-06 06:29:06
问题 Using VSTO, how can I get notification of changes to the MS Office color scheme? 回答1: Hopefully something better exists with Office 2010. Here's what I used for Office 2007 and Word (This is not a notification in any way, just something to check for): const string OfficeCommonKey = @"Software\Microsoft\Office\12.0\Common"; const string OfficeThemeValueName = "Theme"; const int ThemeBlue = 1; const int ThemeSilver = 2; const int ThemeBlack = 3; using (RegistryKey key = Registry.CurrentUser

Excel VSTO Add-in error - application domain could not be created

孤街浪徒 提交于 2019-12-06 05:49:41
I have an Excel VSTO Add-in that is not installing on one of my users machines. It installs fine on everyone else's machine so far (8 machines), but on this one specific machine it is giving the following error message. Customization could not be loaded because the application domain could not be created. ************** Exception Text ************** Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created. ---> System.TypeLoadException: Could not load type 'System.AddIn

Outlook COM addin installed but not loading in Outlook

谁说胖子不能爱 提交于 2019-12-06 05:37:35
问题 I have created an Outlook addin using Visual Studio 2010 that installs fine and creates the appropriate registry keys and folders in Program Files (x86) as I have specified and it shows in Add and Remove programs. However, when I launch Outlook 2010 - it doesn't show up and when I check the COM Addins, it is not available in the list. I created the Setup in VS and added the Output of the main project in the file system as usual and also included the .vsto file. Any pointers anyone please? 回答1

Write to cell in excel using c#

三世轮回 提交于 2019-12-06 05:00:55
I created a visual studio excel workbook project which contains ThisWorkbook class and I then included a functions class so that I can create my own excel function. I am trying to write a value to a cell using c# through the use of the function. I can write to the excel cell through the function class but only by creating a new application/workbook. So everytime I use this excel function, it will open new instance of excel. Is there a way I can write to a cell in the current excel workbook that is already opened? You probably create a new Excel application, instead of connecting to the active

Visual Studio 2008 Outlook 2007 AddIn with WPF Window

99封情书 提交于 2019-12-06 04:59:30
I've not been able to find a whole lot on this anywhere. Let me start by saying I don't want to use the old Windows Form. I want to add a new WPF Window to my outlook 2007 addin project in visual studio 2008. The WPF Window template however does not show up. I was following this tutorial: http://msdn.microsoft.com/en-us/library/bb410039.aspx , which even had a picture of how you could add a new wpf window to your outlook 2007 addin. The only problem is that it is for visual studio 2005. Surely microsoft did not remove this ability from visual studio 2008. I must be doing something wrong. Does

Set Publisher in Word Options Add-Ins Dialog

被刻印的时光 ゝ 提交于 2019-12-06 04:12:52
问题 I have made an addin for Microsoft Word 2010 Beta using Visual Studio 2010 RTM. When I look at "View and manage Microsoft Office Add-ins" the publisher shows up as None. Would code signing with a Software Publisher Certificate fill in the Publisher field? The ClickOnce manifest is signed with a Code Signing certificate. Would signing the assembly with a strong name key file fill in the Publisher field? Is there a method using codesign.exe that would fill in the Publisher field? Note: Using

Creating a (ClickOnce) setup for VSTO Outlook Add-in

有些话、适合烂在心里 提交于 2019-12-06 03:29:39
问题 So I created an Outlook Add-in and used the click-once setup to deploy it. The setup runs fine when the user is administrator, but otherwise: no go. Running the setup with "run as..." and logging in as admin works, but than the add-in is installed under the admin, not the current user. The addin doesn't show up in outlook. I tried following this guide: http://blogs.msdn.com/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspx But I get stuck at part I: http://blogs