Outlook Addin Not loading when launching Outlook through application Hi
I am having a bizarre problem.
I have created an outlook addin and created a setup. (VSTO 2005)
I installed the setup.
Now when i launch outlook, the addin is getting loaded properly.
But when I try to launch outlook (2003) from the click of a button of another .net form, the outlook does not load the addin. It sets the loadbehaviour value in the registry to 2.
There is a runtime error occuring. There should not be a problem with the code in the addin-as if that was teh case, the standalone outlook should have also failed.
Is it something to do with security
any help will be apprecaited Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Office 2000 Compatibility with VSTO-Generated Document Hello :)
I recently had a discussion with a friend who explains to me that it was possible to use VSTO with office 2000. So I explore the Internet to see what exactly the answer is, and I am only able to read that VSTO (all versions) can only be used with Office 2003 or any later versions.
1) If I create an application using VSTO and Office 2003, could I read any Excel document -generated with this program- with Excel 2000 (even if the document is really simple )
2) If I install VSTO and specify to it the PIA of Office 2000, can I create a valid application generating well-shaped Excel 2000 Files
3) What is the best /simple /only way to create a .Net application generating Office 2000 document
Big Thanks for your answers and sorry for my bad english ;) Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Unable to create Excel Workbook Project I believe that the error may be the result of a missing registry key as I was able to reproduce the problem that you described once I installed the Visual Studio 2005 June CTP. I found that once I added the following registry key that I was then able to successfully create a VSTO project for Microsoft Excel. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VSTO] String Value Name - ProductDir Data - C:\Program Files\Microsoft Visual Studio 8\Visual Studio Tools for Office Note that you may need to modify the path to the location where you installed Visual Studio 2005. Hope this helps! Regards, Ken Laws MSFT This posting is provided "AS IS" with no warranties, and confers no rights. For more information regarding Visual Studio Tools for Office 2005: Best of Blogs: Visual Studio 2005 Tools for Office http://msdn.microsoft.com/library/default.asp url=/library/en-us/odc_2003_ta/html/odc_landvsto2005_ta.asp Visual Studio Tools for Office Forum http://forums.microsoft.com/msdn/ShowForum.aspx ForumID=16 Visual Studio Tools for the Microsoft Office System http://msdn.microsoft.com/office/understanding/vsto/default.aspx Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Customize Outlook View--use Custom Task/Form, or what? I am looking for how to implement the following:
Modify Outlook UI (VSTO, I assume), so the Mailbox view, the navigation pane displays a list of folders, which are not mail folders. They would be folders which represent folders say on our document storage server.
The user should be able to "move" items from say their inbox folder, DRAG AND DROP onto these custom folders mentioned above, then somehow implement code to copy the mail message to the other server.
The requirements are asking to have these custom folders, hopefully inside the Outlook Navigation pane (or at least on left nav ).
My question is what customization concept should I use
My first research (reading only) suggests the usage of a custom task pane, maybe with a tree control. But not sure if I can drag and drop and not sure if I can get the custom task pane to appear in left nav.
Any help would be appreciated. Thank you for your time. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Problems with the CRM Integration Sample No. This sample is for Outlook 2003. Because it is developed by VSTO 2005. VSTO 2005 only supports Outlook 2003 Add In.
Thanks
Ji Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
vsto document will not run Hi all,
I have constructed a vsto document that inserts data from SQL server into a word document. Unfortunately I am experiencing the problem where the customisation is not running. I have added the location and the document to the dotnet security policy with CASPOL.EXE as suggested in many online resources but this is just not making a difference to the situation.
Any more ideas or input would be wholly apreciated! The error message is as follows:
Could not load file or assembly 'mydoc, Version=1.0.0.22, Culture=neutral, PublicKeyToken=34d45155654fbf7a' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)
************** Exception Text ************** System.IO.FileLoadException: Could not load file or assembly 'mydoc, Version=1.0.0.22, Culture=neutral, PublicKeyToken=34d45155654fbf7a' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418) File name: 'mydoc, Version=1.0.0.22, Culture=neutral, PublicKeyToken=34d45155654fbf7a' ---> System.Security.Policy.PolicyException: Execution permission cannot be acquired. at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.HandleOnlineOffline(Exception e, String basePath, String filePath) at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadStartupAssembly(EntryPoint entryPoint, Dependency dependency, Dictionary`2 assembliesHash) at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain() at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServiceProvider serviceProvider) at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecuteCustomization(IHostServiceProvider serviceProvider)
************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- msosec Assembly Version: 7.0.5000.0 Win32 Version: 7.10.3191.0 CodeBase: file:///C:/WINDOWS/assembly/GAC/msosec/7.0.5000.0__b03f5f7f11d50a3a/msosec.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- Microsoft.VisualStudio.Tools.Applications.Runtime Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.762 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll ---------------------------------------- Microsoft.Office.Tools.Common Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.42 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll ----------------------------------------
Thanks!, Crich Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Error adding a control in Worksheet Hi Marcos,
See if the following thread (Geoff's answer) can solve it for You.
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1067025&SiteID=1 Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Excel: SaveCopyAs from doc-based solution after deleting Sheet1, copied workbook fails to load Hi,
I am positive that this will work in a U.S. Keyboard layout without dependency of locale setting. But another secure way will be prompt and request user to save the workbook first, before save a copy of current workbook.
In the button event handle:
Code Block
If(this.Saved)
{
¡//Do your action save copy
}
Else
{
MessageBox.Show(¡°Please save the workbook first¡±);
}
Thanks
Ji Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Properties on outlook2003 folders Thank you for your reply. It was really helpful. Redemption and HiddenItems solved my problem. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Can not open Sample project Zubair,
This post didn't help. One thing I doubt is, I am using office 2003 SP2. These samples are developed in Office 2003 SP1.
Are you using Office SP1 or SP2
~Sen Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Post It Note Type Comments Control In Word Document Hi Corby
"Thanks for the flowers ". You'll also find me in the office.developer and the word.vba newsgroups listed in "Please Read First". I wouldn't send you there, otherwise - that's actually more where I "live". It's a fine line a moderator walks: trying to keep a forum on-topic and at the same time provide people with information...
To give you a quick answer: Word doesn't expose a lot of events and isn't very "generous" about letting the Windows API "do its thing" in a Word document window. You can draw rectangles, but making them behave like comments (display only when the mouse hovers) won't be possible - no mouse events. No drag-and-drop events, either, I'm sorry to report. No "panels" you can float. No paint events you can override...
Besides comments, the closest thing we do in Word is to place a textbox or a frame in the margin, next to the text ("marginals" in documentation-speak) that are anchored and formatted to move with the text. They can be pretty cool, actually, as they can be defined as a style. Then you can type text in its own paragraph, apply the style, and the whole thing positions itself quite nicely. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
VSTO 2005 Visual Studio 2005 Office 2007 Office 2003 DaveB62366 wrote:
So even though I have BOTH Office 2003 and 2007 installed side-by-side, and both are operational, VS2005 will use the Office 2007 PIA's.
Yes, that's what happens ...
DaveB62366 wrote:
What if I re-installed Office 2003 after the 2007 installation Would VS2005 still bind to 2007
I'm not sure, actually, since I've never personally tried this ...
DaveB62366 wrote:
There's no way to switch from 2007 to 2003, possibly in the registry
If there is, again, I'm not personally familiar with a way to make this happen; someone from the VSTO Dev Team would have to offer up that information.
DaveB62366 wrote:
Lastly, If I used VSTO 2005 / VS2005 to develop an application in Office 2007, is there any way to have it run on Office 2003 I think I know the answer to that question, but figured I'd double check.
In order to run a VSTO solution on both Office 2003 and 2007, you have to develop your solution against Office 2003 and the 2003 PIAs. The Office 2003 PIAs will work on 2007, but the 2007 PIAs are not backward compatibile with 2003 ...
You could set-up a Virtual Machine, and have your development environment configured with 2003, and then a seperate VM with Office 2007, all on one computer ... Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
XLMS doc won't load in 2007 when I save a file in xlms it gives no indication of an error. When I open it from the windows explorer it has an exclamation point on the xlms document and does not load properly. Do anyone know what this means or how to fix it Not sure if it has anything to do with it, but I am using custom properties. Thanks. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Excel Non-US Date Formatting I have a small VB.NET app to convert a directory full of xls files into csv format for further processing. I am using interop to get Excel to open the files, and then SaveAs into the csv format.
We are in the UK, so our dates need to be formatted in the UK style. Using Excel itself to do this will work just fine. The dates in the csv will be properly saved in UK format. Trying to do this from my VB is proving impossible, as the Excel object model refuses to get out of it's "everyone is American" mindset.
I have tried setting the ExcelLocale1033 attribute to False, and using ExcelLocale1033Proxy.Unwrap on my Excel Workbook and Worksheet objects, but nothing seems to change the way that the file is saved. I've also specifically set a UK locale for my Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture, with no success.
If anyone has any ideas, they would be most appreciated. All I need is to be able to get Excel to open an xls, and save it out as a csv, without corrupting the date values.
Cheers,
Will Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Error HRESULT E_FAIL has been returned from a call to a COM component. I had the same exact problem. What I did was to create another VSTO project that adds the command button to ther bar, and I save the change in the document. Once that's done, I use that Word document on my other project. This way, you have the button in the bar as though it was done on design time. It's a workaround, I know, but it accomplishes the goal. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
VSTO 2005 Excel C# I authored a simple application written using VSTO 2005 Selecting Excel.Workbook as a project template. Originally I used the Action pane to solicit user input using a user control containing 3 buttons and two list boxes. The list boxes were populated using XMLDoc features and the data returned is also from an XML file.
The application runs perfectly when installed on any systems running MS Office 2003 Pro. Unfortunately it would not run on machines where MS Office 2003 Std was installed. After reading several articles yada yada yada. I decided to embed the controls in the worksheet eliminating the Action Pane (Very unfortunate)... But, much to my dismay, this application works properly under MS Office 2003 Pro, but again does not work with MS Office 2003 Std.
I am pulling out my last hair as I type.... What does it take to make an application work under MS Office 2003 Std. Is there something else disabled that I need to eliminate
Thank you for any help you can render.
Rick Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Excel: SaveCopyAs from doc-based solution after deleting Sheet1, copied workbook fails to load Hi,
I am positive that this will work in a U.S. Keyboard layout without dependency of locale setting. But another secure way will be prompt and request user to save the workbook first, before save a copy of current workbook.
In the button event handle:
Code Block
If(this.Saved)
{
¡//Do your action save copy
}
Else
{
MessageBox.Show(¡°Please save the workbook first¡±);
}
Thanks
Ji Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Where is default font color stored? I see that in Options.DefaultHighlightColorIndex the hilight color is stored, but I can't find where the current default font color is stored. The actual fontcolors could change from selection to selection BUT if you look at the font color toolbar button - its still the last color you set it to. Where in the Word object model do I find that color
Thanks Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
vsto distribution I got it!!!
I had the wrong version of the vsto.exe (must be second addition, of course) I'm looking forward to the updated addtion of your blog for 2007. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Shared Add-in crash outlook Hi,
I'm building an outlook add-in as shared add-in with vb.net and vsto. The problem is that in unexpected time(eg: while i'm debuging the project) outlook crashes without any messages(not even in event viewer) and does not start again.
The 1st time i had to repair .Net framework, this time i can't figure out what is wrong.
The only message that i can see(event viewer->ms office sessions) is:
Warning:Microsoft Office 12 Sessions ID: 7003 Description: ID: 6, Application Name: Microsoft Office Outlook, Application Version: 12.0.4518.1014, Microsoft Office Version: 12.0.4518.1014. This session was terminated unexpectedly.
The outlook version is 2007 with BCM and my add-in is a Shared Add-in, not an Outlook Add-in.
My code "ending" not "crashing" into " OnConnection" function at the last line of code " InitializeAddin" which executed normaly
Any ideas
Thanks,
John Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
reference Form Region controls from Item_Send() Rafael1119 wrote:
The problem I've ran into is that when I compose the message on IPM.Appointment, the data I entered in the form region is lost when I send the meeting request given that the the form being used is different(IPM.Schedule.Meeting.Request).
My thought is to copy the data from the appointment form to the meeting request form on its way out using the Item_Send() event but I have not been able to find good examples/code to reference a form region and its controls.
Hi Rafael,
Of course, we can get reference of custom form and its controls in ItemSend event handle. I just follow and modify a walkthrough from MSDN (tell us how to create a Form Region in Our Add-in): http://msdn2.microsoft.com/en-us/library/aa942741(VS.80).aspx
In fact, I create a Class FormRegionTest which is derived from Outlook.FormRegionStartup. And then I declared three public variables in that Class, as types: Outlook.FormRegion, UserForm, Outlook.OlkTextBox. Then in BeforeFormRegionShow Method, we set these variables to the real custom form and the form¡¯s controls. Codes are like these:
Code Snippet
public Outlook. FormRegion FormRegion;
public UserForm UserForm;
public Outlook. OlkTextBox OlkTextBox1;
public void BeforeFormRegionShow(Microsoft.Office.Interop.Outlook. FormRegion FormRegion)
{
this .FormRegion = FormRegion;
this .UserForm = FormRegion.Form as UserForm ;
try
{
OlkTextBox1 = UserForm.Controls.Item( "TextBox1" ) as Outlook. OlkTextBox ;
}
catch ( Exception ex)
{
MessageBox .Show(ex.ToString());
}
}
After that done, in Add-in Class, you should declare a instance of FormRegionTest and assign its value the same as what you return from RequestService Method. Codes are like these:
Code Snippet
private FormRegionTest formRegionTest = null ;
protected override object RequestService( Guid serviceGuid)
{
if (serviceGuid == typeof (Microsoft.Office.Interop.Outlook. FormRegionStartup ).GUID)
{
formRegionTest = new FormRegionTest ();
return formRegionTest;
}
else
{
return base .RequestService(serviceGuid);
}
}
Then in Item_Sent event handle, we can use formRegion.UserForm to access the custom form and formRegionTest.OlkTextBox to access the TextBox1 control on the form. Codes:
Code Snippet
void Application_ItemSend( object Item, ref bool Cancel)
{
MessageBox .Show(formRegionTest.OlkTextBox1.Text);
}
Wish this can help!
But I am still not very sure about if your objective can be achieved by the means you mentioned above, because we cannot tell when ItemSend method gets performed, if we can still access the Meeting Request Form and write data to it. You can have a try. Good luck!
Exactly speaking, this is a little off topic here, Outlook Newsgroup will be a better place J
Thanks
Ji Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Office 12 COM AddOns Events Is it possible to set an C# OnDoubleClick Event to a shape in Visio
the function/procedure must be handled in C# AddOn. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
VSTO Excel column name Jeremy,
Have faith
The following example shows another approach which can be used in Your case where both startcell and lastcell can be 'dynamic'. Yes, I know that we can't use the With statement in C#:
Sub Grab_Range() Dim wsSheet As Worksheet Dim rnTarget As Range
Set wsSheet = ActiveSheet
With wsSheet Set rnTarget = .Range(.Cells(1, 2), .Cells(100, 22)) End With
Debug.Print rnTarget.Address
End Sub Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
API to retrieve Address from outlook address book? In versions before Outlook 2007, Outlook does not directly expose the right-click context menu in its CommandBars collection. You will, however, see a new right-click command is when the item selected is using a custom form that includes one or more custom actions. You can also add a custom action without using a custom form, as demonstrated at http://www.outlookcode.com/codedetail.aspx id=526
Richard Kagerer has posted a code sample at http://www.outlookcode.com/codedetail.aspx id=314 that shows how you might trick Outlook into exposing the context menu through Explorer.CommandBars.
The C++ sample add-in at http://www.codeproject.com/atl/outlook2k3addin.asp also shows a technique for working with the context menu.
Outlook 2007 provides Application-level events for the most commonly used context menus.
In none of these cases, however, are context menus in the address book exposed. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
AccessViolationException in DatagridView The fact that this error only happened in Office AddIns on my PC made me looking for a solution in a completly wrong direction. It's not a problem in VSTO, it's a bug in the DataGrid and DataGridView control.
A workaround can be found at:
http://forums.microsoft.com/msdn/ShowPost.aspx postid=1652215&isthread=false&siteid=1
Thank u,
Frank Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Outlook - how to get full emailaddress from To filed in Outlook The Recipient.AddressEntry.Type property will tell you whether it's an SMTP address or an Exchange (EX) address. Exchange addresses are always in X.400 format. If you want the SMTP address for an Exchange user, you need to use Outlook 2007, Redemption, MAPI33, Extended MAPI, or CDO 1.21, the last two not being supported directly in .NET languages. See http://www.outlookcode.com/codedetail.aspx id=1112 , though, for a MAPI sample.
See http://www.outlookcode.com/d/code/getsenderaddy.htm#redemption and http://www.cdolive.com/cdo5.htm#EMailAddressOfSender for Redemption and CDO examples and http://groups.google.com/group/microsoft.public.outlook.program_vba/browse_frm/thread/4d4d5fece24a2a7/ad2fcbb691d5bf18 for a discussion of the property to use with Cached Exchange Mode in Outlook 2003 or later. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
How to get Associated Icon of Attachment Neither/both. I'm talking about standard email attachments, so it could be a .doc, a .jpg, a .whatever. Is there a way to access whatever icon has been associated with the file type Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Outlook Addin for Windows Vista... Followed the exact instruction at this article
http://msdn2.microsoft.com/en-us/library/aa537179(office.11).aspx
It was failing with error code 2869 found Misha's post and did exactly as per "Omar" suggested but
My setup project is failing to install with the following error message..
"Error 1001 Can not set the security policy --> Can not create security code group 'Outlook Addin' The system can not find the file specified. Exception from HRESULT: 0x80070002 Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Installation woes when running Office 2007 So I have a new Tablet PC with Visual Studio 2005, Office 2007 and Windows XP Tablet Edition. I am going to work on the new VSTO book with it. VSTO 2005 SE installs fine, but there are no document projects. So I tried to install VSTO 2005 First Edition, but it requires Office 2003 SP1 to run. I don't WANNA install Office 2003.
Is there a way to get just VSTO Addins and Documents for 2007 on a VS 2005 box
S Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Using SetSecurity to Deploy Third Party DLLs For anyone who has this problem, a solution that works is available at the following thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=267462&SiteID=1 Enjoy! Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Using a Multi-Project with a Web Site frontend and VSTO Word Project to populate Word templates Not so much on msdn as at OpenXMLDeveloper.org, although that's targeted more at 2007. But the internal XML that defines the Word document is pretty much the same (WordProcessingML) in both versions.
The best resource I know of, besides the Word 2003 schemas (which you should find for download on msdn) is the O'Reilly book "Office 2003 XML". That goes into quite some detail about how WordProcessingML is structured, what to expect of it, and how to effectively transform it. Tag: Visual Studio Tools for Office Add-in for Word 2003 and 2007 Office
Minh C Nguyen
I am working on a project that involves developing add-ins for both Word 2003 and 2007. I have VS 2005 Professional and VSTO SE installed. However, I heard that VSTO SE does not support having both Microsoft Office 2003 and 2007 installed on the same development machine. Has anyone found a solution to work around this Thank you.