[HELP!] COM Exception E_FAIL Adding Controls to ActionsPane Hi, I've built a document customization for Word 2003 using VSTO 2005 and it worked fine on my machine However on some other machines, my users report the error that occurs when the customization starts and the first control is added onto the ActionsPane. Below is the error description. Somewhere in forums I read that the error used to occur on machines without SP2 for Office 2003 and they recommended to workaround it by making the ActionsPane.Controls.Add(control) the very first operation in ThisDocument_Startup. It did work for the old installations, however I have found that with the Office build versions later than SP2 (such as 11.0.8106, 11.0.8125) people sometimes report the same bug, despite the workaround. Surprisingly, when I turned the workaround off for the newer builds, the bug disappeared again, but it worked only partially (e.g. worked for 8125, but didn't work for 8106). I hate to become dependent on user's build version of Word and I don't feel confident I will guarantee that the bug will not occur on other, yet untried machines and versions. THIS IS AN URGENT POST-DISTRIBUTION ISSUE. PLEASE HELP! Versions: ============================== Word: 11.0.8125 (SP2) .NET Framework: 2.0.50727.42 OS: Microsoft Windows NT 5.1.2600 Service Pack 2 Exception: ============================== Type: System.Runtime.InteropServices.COMException Message: Error HRESULT E_FAIL has been returned from a call to a COM component. Stack Trace: ============================== Class: Microsoft.Office.Tools.IActionsPaneSite Method: Void SetClient(System.Object) ------------------------------ Class: Microsoft.Office.Tools.ActionsPaneInternal Method: Void HookupSmartPane() ------------------------------ Class: Microsoft.Office.Tools.DockableControlCollection Method: Void Add(System.Windows.Forms.Control) ------------------------------ Class: StoryboarderPro.ThisDocument Method: Void InitializeCustomization() ------------------------------ Class: StoryboarderPro.ThisDocument Method: Void ThisDocument_Startup(System.Object, System.EventArgs) ------------------------------ Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Selection.Move infinite loop on Word 2007 document I am writing a Word 2007 add-in with VSTO SE. A button in my custom task pane moves the Selection through a document in steps of one paragraph. The code is shown below. It hangs midway through the document in an infinite loop. The document I am testing is a Microsoft financial document at http://www.microsoft.com/msft/download/FY06/MSFT_3Q2006_10Q.doc . Is this a bug It does the same thing if I save the document as a .docx file.
The problem is the selection keeps moving in a circle in this table (from Page 20 of the document).
Three months ended March 31,
Percentage
Change
Nine months ended March 31,
Percentage
Change
(In millions, except percentages)
2006
2005
2006
2005
Revenue ..................................................
$
10,900
$
9,620
13%
$
32,478
$
29,627
10%
Operating income ..................................
$
3,888
$
3,329
17%
$
12,591
$
11,572
9%
It loops the Selection in the following sequence forever:
Percentage Change
Nine months ended March 31,
Percentage Change
2006
2005
(Repeats back to step 1)
Here is my code:
private void button1_Click( object sender, EventArgs e) { Word. Application app = Globals .ThisAddIn.Application; object objTrue = true ; object moveUnits = Word. WdUnits .wdParagraph; object moveCount = 1; int count = 0; Word. Paragraph p2 = app.ActiveDocument.Paragraphs.First; app.Selection.SetRange(p2.Range.Start, p2.Range.End); while (app.Selection.Move( ref moveUnits, ref moveCount) > 0) { count++; textBox1.Text = count.ToString(); textBox1.Refresh(); app.ActiveWindow.ScrollIntoView(app.Selection.Range, ref objTrue); } } Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
There is no designer for the class Microsoft.Office.Tools.Word.Document I've never used VSTOR before and I've taken over a C# project that provides the code behind a Word template. When I try and view the .cs file behind the Word template in Design view, I get the following error:
There is no designer for the class Microsoft.Office.Tools.Word.Document
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo) at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
The project was created in Visual Studio 2003 and I am using VS 2005; I had to modify the .csproj file associated with the project to get it to open at all, I'm wondering if maybe that is the source of the problem
I apologize if this is better suited to one of the other forums, please move it if appropriate. Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Grief with ContentControlOnExitEventHandler Hi My code turns an event handler for this on and off, with
public Microsoft.Office.Interop.Word.Document myDoc = Globals.ThisAddIn.Application.ActiveDocument; myDoc.ContentControlOnExit += new Microsoft.Office.Interop.Word.DocumentEvents2_ContentControlOnExitEventHandler(ContentControl_Exit); and myDoc.ContentControlOnExit -= new Microsoft.Office.Interop.Word.DocumentEvents2_ContentControlOnExitEventHandler(ContentControl_Exit); I have found that if I call myDoc.ContentControlOnExit += new Microsoft.Office.Interop.Word.DocumentEvents2_ContentControlOnExitEventHandler(ContentControl_Exit); n times (without calling -=), then the method
void ContentControl_Exit(Word.ContentControl cc, ref bool InUndoRedo) will be invoked n times. Is this expected behaviour So I'm trying to ensure I only ever do += (without a corresponding -=) once. (Can C# tell me how many += I have in effect at any given time ) I'm trying to enforce either 1 or 0 by MyContentControlOnExit += new Microsoft.Office.Interop.Word.DocumentEvents2_ContentControlOnExitEventHandler(ContentControl_Exit); MyContentControlOnExit -= new Microsoft.Office.Interop.Word.DocumentEvents2_ContentControlOnExitEventHandler(ContentControl_Exit); private Boolean CcOnExitRegistered = false; public event Microsoft.Office.Interop.Word.DocumentEvents2_ContentControlOnExitEventHandler MyContentControlOnExit { add { Trace.WriteLine("In MyContentControlOnExit"); if (!CcOnExitRegistered) { myDoc.ContentControlOnExit += value; CcOnExitRegistered = true; } else { Trace.WriteLine("CcOnExitRegistered already .. ignoring"); } } remove { CcOnExitRegistered = false; myDoc.ContentControlOnExit -= value; } } Is that the recommended approach Finally, as a sanity check, I'm assuming that setting the above up in a Custom Task Pane means that it will only fire/handle in the document window that custom task pane is associated with, and not in the course of computing a .Compare or working in any new document the code in the Custom Task Pane (especially, ContentControl_Exit) may also create Word.Document remoteContent = new Microsoft.Office.Interop.Word.Document(); thanks very much! Jason Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
How to get the range string of a worksheet.range object We all know that we can get a range object by using: get_range("A1:B1"), but if I have a range object, how can I get its address string --> "A1:B1" I wants to create a chart and give its source value as "A1:B1,D1:F1,G1:H1", so I need to get the string of range address. Thanks Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
A lot of pain with Word automation I'm having a lot of difficulty trying to do simple things with Word 12.0 Object Library. 1) When I try to create a new document... Microsoft.Office.Interop.Word.ApplicationClass oWordApp = new Microsoft.Office.Interop.Word.ApplicationClass(); Microsoft.Office.Interop.Word.Document oDoc = oWordApp.Documents.Add(ref missing, ref missing, ref missing, ref missing); Documents.Add returns null, and Documents.Count is still 0. 2) When I try to open an existing document.... oDoc = oWordApp.Documents.Open(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); it hangs at this statement and I have to stop it (I waited like 15 minutes). Can anyone help Please!! And thank you. Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
OleDbPermission error accessing assembly I have just installed the .Net Framework security update and started getting the following error when testing on my development PC:
Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Cluture= neutral, PublicKeyToken=... ' failed.
I am receiving the error in a VSTO Add-in for Word 2007 - this add-in accesses another VB.net assembly that uses oledb to lookup information in an Access db.
Why would this suddenly appear following the yesterday's security update
I am thinking I must need to set some OleDB permission parameters or machine-level security policy in Caspol.exe (or both). Could someone point me in the right direction
Thanks. Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
VSTO C# Add-In Excel In-Place Activation Hi, The situation: - VSTO add-in for Excel - a workbook is edited in-place (Wordpad or Word) Problem: - wiring any events like Application_WorkbookActivate in the startup makes Excel hang; the shutdown or Application_WorkbookOpen events are not triggered; killing Excel and starting it again, it offers to recover the in-place edited file, meaning the OLE document was not correctly closed. - if no events are wirred Excel stops correctly (when WordPad or Word document is closed) Any idea Thanks! Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Ribbon menu and Toggle buttons Hello.
I created group with 3 toggle buttons:
< group id ="SData" label ="S Data" > < toggleButton id ="SDataAssignmnets" size ="large" label ="Assignments" screentip ="Show/hide external data Task Pane" onAction ="OnSDataButton" image ="Folders 32 n p.png" /> < toggleButton id ="SDataCustomers" size ="large" label ="Customers" screentip ="Show/hide external data Task Pane" onAction ="OnSDataButton" image ="File and Folder 2 32 n p.png" /> < toggleButton id ="SDataContacts" size ="large" label ="Contacts" screentip ="Show/hide external data Task Pane" onAction ="OnSDataButton" image ="Contact 32 h p.png" /> </ group >
I want to use they like radiobuttons (only one button can be pressed simultaneously). How can I do that Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Override the VISIO menu Hello,
I want to overload the VISIO File>Open menu so that i can show my custom open dialog when user click on it.
Please let me know how i can implement it in C#
Thanks
Sunil Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
How To Add a new ActionsPane in Powerpoint 2003? How To Add a new ActionsPane in Powerpoint 2003 Please send me some links or any code Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Excel sheet delete/rename/move/copy How do I handle following events in excel 2003 (with C#)
sheet rename
sheet delete
sheet move
sheet copy
Also, is it possible to disable only a few options in sheet right click popup menu Protecting the workbook is not acceptable in my case.
thanks... Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
How I Can Add My Template to The Templates List of Word? I created a VSTO Word Template and I don't know how to add it to the word templates.
I can run it by double-clicking on it, But I couldn't open it by "Select Template".
Why How I can add it to the templates list of Word Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
DataBinding in Excel2007 tables using VSTO SE When developing an application-level addin in VSTO SE for Excel 2007, is it possible to use the VSTO's Microsoft.Office.Tools.Excel.ListObject for databinding support I know how to create such ListObject from a Microsoft.Office.Tools.Excel.Worksheet, but I don't have a VSTO's Worksheet, only an Interop one. The objects I can use are the ListObject and Worksheet from the Microsoft.Office.Interop.Excel namespace, but they lack of data binding capabilities. Is there any way I can still use the Microsoft.Office.Tools.Excel.ListObject Thanks, Sole Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
VSTO 2003 for Visual Studio 2003 One of my user use to work on Visual Studio 2003 and Microsoft Office 2000 in coordination to develop certiaon applications. He needs to have a compatible version of VSTO which can work with Visual Studio 2003 and Microsoft Office 2000.
Is there any way I can download the VSTO 2003 compatible verison
Thanks
Amit Rao Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Action Panes and Excel Addins hello friend
i am try to cerate Action pane for word document
but am getting NullReference Exception
and am choosing MSWord Addin Project and Am using MS office 2003
help me
Using VS2005 and VSTO2e
thanks in advance Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Use Outlook 2003 to send meeting request using c# Please help me I must send mail by c# and visual studio 2003 so i can't use VSTO for 2005 and also can' t use some tool that require liences.
And more importance I must use COM by way access to Outlook 2003 to send mail.
I got it but the big problem is ... security .. warning messages that i need access then mail will delivery +_+ it is big problem. So anyone here can help me. I research about outlook very much so i knew that .... create Add-in project and it ok ( because it will trusted with outlook). And another way is use VSTO for it but .. you know i can' t use visual studio 2005 .
So how i can do it Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Fixed panel at left in a excel-worksheet Hi,
I need a fixed panel in a worksheet, it has to scroll down or up with worksheet. I could not find a way to do that with VSTO. I use Excel 2007 and VSTO 2005 SE. I searched the forum but found nothing., What i want is something like that: http://stud4.tuwien.ac.at/~e0027385/excel-addin-panel.jpg the image was from an addin taken, so it must be possible but how Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Table Style in Excel 2007 Addin Hi,
I am trying to create an excel addin for office 2007 using VS2005 & VSTOSE. I would like to create a table style on the startup. I tried calling the below procedure in ThisAddin_Startup(). Procedure runs but the style is not available. Can anyone help me on this.
Public Sub TableStyles()
Dim Thiswkbk As Excel.Workbook
Thiswkbk = Globals.ThisAddIn.Application.ActiveWorkbook
Thiswkbk.TableStyles.Add( "MyTableStyle" )
Thiswkbk.TableStyles( "MyTableStyle" ).TableStyleElements(Excel.XlTableStyleElementType.xlWholeTable) .Font _
.Color = RGB(51, 90, 143)
With Thiswkbk.TableStyles( "MyTableStyle" ).TableStyleElements(Excel.XlTableStyleElementType.xlWholeTable).Borders(Excel.XlBordersIndex.xlEdgeBottom)
.Color = RGB(51, 90, 143)
.Weight = 2
.LineStyle = 1
End With
With Thiswkbk.TableStyles( "MyTableStyle" ).TableStyleElements(Excel.XlTableStyleElementType.xlHeaderRow).Borders(Excel.XlBordersIndex.xlEdgeBottom)
.Color = RGB(51, 90, 143)
.TintAndShade = 0
.Weight = 2
.LineStyle = 1
End With
End Sub
Thanks,
Mohan Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
How to Set Default Form for Outlook Folder through C# Hi Frenz,
I have been stuck with a very worst problem, almost search entire web but did'nt get any solution.
My query is how do you set a default form (I have created that form) for an outlook folder through C#. I have been able to publish my form successfully through the code, however i can't set it default through the code so that whenever i create a new contact item in that folder it should use the form that i have created. I'm using Outlook 2003 & Visual Studio .Net 2003 with .Net 1.1 framework.
I know how to set the form as default form for th folder manually but not through C#.
If anyone knows the solution for the same request you to pls help me.
Thanks in advance. Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Adding SmartTags Hello, I am running VS 2005 with VSTO and Office 2003. I am trying to create a Word document smart tag, however when I try to call
Code Snippet this.VstoSmartTags.add(mySmartTag);
I get an error saying there is no definition for VstoSmartTags. Here is my full code
Code Snippet
using System;
using System.Windows.Forms;
using Microsoft.VisualStudio.Tools.Applications.Runtime;
using Word = Microsoft.Office.Interop.Word;
using Office = Microsoft.Office.Core;
using Microsoft.Office.Tools.Word;
namespace WordAddIn3
{
public partial class ThisAddIn
{
private void ThisAddIn_Startup( object sender, System. EventArgs e)
{
SmartTag mySmartTag = new SmartTag ( "http://www.digg.com#digg" , "Digg it" );
mySmartTag.Terms.Add( "digg" );
Action myAction = new Action ( "&Digg this story!" );
myAction.Click += new ActionClickEventHandler (myAction_Click);
this .VstoSmartTags.add(mySmartTag);//error occurs here
}
void myAction_Click( object sender, ActionEventArgs e)
{
MessageBox .Show( String .Format( "You dugg this story!" , e.Range.Start));
}
private void ThisAddIn_Shutdown( object sender, System. EventArgs e)
{
}
private void InternalStartup()
{
this .Startup += new EventHandler (ThisAddIn_Startup);
}
}
} Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Run an External Macro in a xxxx.dot file from the Office Ribbon on the current ActiveDocument Hello,
Im trying to write a method that when you click the button i created in my custom ribbon, calls a method that runs a macro from another file somewhere on the ActiveDocument.
So far i have this method below which i have put together from various different hints on the web. control.Tag holds the name of the file i wish to call that has the macro inside it, that i want to apply to the current document.
But good.run(template) keeps throwing "No overload for method 'Run' takes '1' arguments" I have not been able to find a comprehendible explanation of this error.
public void RunMacroProg( IRibbonControl control)
{
Word. Application good = new Word. Application ();
Word. Document bad = good.ActiveDocument;
Object template = myMacroLocation + control.Tag;
good.Run(template); Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Prevent Outlook from embedding attached image I'm using Outlook 2003 and C# and I'm trying to create a MailItem using Microsoft.Office.Interop.Outlook.Application
It is working so far, but there is a small problem. I create a new message and set the the BodyFormat to olFormatHTML. Then I attach an image "test.png" to the mail. In the HTMLBody I use this image as a source:
<img border="0" align="middle" src="test.png" />
After executing Display(false) on the created MailItem object I see this message, but without the image attachment - it is automatically converted to an embedded image with the cid:-link as image source in html code.
Is it possible to use attached images as image sources in html-body, but also to keep them as attachments Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
VSTO & Outlook custom regions Hi,
Is there any support for Outlook Custom Regions in VSTO 2005 SE I mean sample FormRegionStartup class like with Ribbon.... (and perhaps without needing to modify registry manually)
I have tried to follow a couple of walkthroughs (both MSDN and from Outlook blogs) but I have a little successs.
System.ArgumentException: The value entered for the DesignMode property is not valid. Enter a proper value. at Microsoft.Vbe.Interop.Forms._UserForm.get_Controls()} Message: "The value entered for the DesignMode property is not valid. Enter a proper value." ParamName: null
is thrown when I try to access Controls collection in BeforeFormRegionShow(Outlook.FormRegion FormRegion) Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
How to replace an XML node? In my application we use XML nodes to delinate word text:
<term guid="xxx"><w:r><w:t>A </w:t></w:r><w:r><w:rPr><w:b/></w:rPr><w:t>Better</w:t></w:r><w:r><w:t> Term</w:t></w:r></w ></term>
The user can select a node and replace it with another existing node (i.e. term).
I've been struggling with how to replace an existing XML node in Word for a couple of days now. I keep track of the currently selected Microsoft.Office.Interop.Word.XMLNode via an Application.XMLSelectionChange event handler.
I've tried this:
System.Xml. XmlDocument doc = new System.Xml. XmlDocument ();
doc.LoadXml(term.xml);
string xml = doc.InnerXml;
Word. Range range = selectedNode.Range;
selectedNode.Cut();
range.InsertXML(xml, ref missing);
which nearly works, but all formatting within the new term is lost. In addition, the XML selection is messed up, but I could probably add some more code to fix that.
I also attached an XML schema to the document so I could try to use the Microsoft.Office.Tools.Word.XMLNode.LoadXml() method. That didn't work for a number of reasons and it too lost the formatting.
Any thoughts on how I can get this to work
Thanks,
Neil Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Need to get several return values from an Excel add-in function I've been searching for a way to do the following (seemingly simple task) for about a week and a half, with lots of code written, but I can't find a solution anywhere:
I want to write an Excel add-in function in C++ (or C#, doesn't matter), that will 'return' values that update multiple cells in the spreadsheet. In other words, the function should have multiple parameters, some of which are "out" (or "in-out") parameters and refer to particular cells in the spreadsheet. After the function is called, those cells should be updated by the results of the function. Also, I don't want to call the function from a range of cells using the kludgy shift-ctrl-alt-space-tab-pagedown-enter thing.
I'm not sure why it's so hard to find a way to do this I keep thinking that I must have missed something. I don't care if it's managed or unmanaged code, XLL, or COM or Automation or .NET or XLOPER, UDF, ADO, OLE, ABC or XYZ. Also, I am NOT creating a spreadsheet from scratch or from a template. This has to be a function that can be added to any existing spreadsheet. I know there is a way to pass parameters by reference in VBA, which will update the cells, but I cannot find any way to do this in a C++ add-in function. It's soooo frustrating. And the on-line documentation is scattered and limited. And I'm waiting to buy the new version of Steve Dalton's book when it comes out in a few weeks
Thanks for any help! Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
ListBox does not appear on my Form Region Hello there !
I am building an application based on Outlook 2007 and VSTO 2005 SE and I encounter an unexpected problem : an Office Listbox control placed manually on a outlook custom form through the Outlook 2007 form editor doesn't appear when the form render during the application running. But, it seems to be instanciated and to be contained correctly in the form : I can use it, add some stuff to it, but nothing never appears, although the others controls of different types work perfectly !
However, I've noticed that the listbox appears randomly under XP, never under Windows Server 2003 x64 and sometimes under Windows Vista... That behavior seems to be hazardous and I can't find a way to determine a logic and fix ou walkaround the bug !
I have to add that my form region is called thanks to an XML manifest refering to the addin where Outlook can get the form content. That form content is embeded in my project resources and return by the classical GetFormRegionStorage method implemented from the FormRegionStartup interface.
Does Someone have already seen these sort of strange behavior with Outlook/Office controls
If you have any idea on a way to follow my researches on this oddity, any comment would be very helpful !
Regards,
Romain Vailleux Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Outbox Frustration Outlook 2007 VSTO Add-in.
The code (below) works fine... and the items do send , but they appear in my Outbox forever. Can anyone offer help in getting the notes to send and to not have them sit in the Outbox Thanks!
Here is the code:
Private Sub Application_ItemSend(ByVal Item As Object, ByRef Cancel As Boolean) Handles Application.ItemSend If TypeOf (Item) Is MeetingItem Then SyncMe(Item)
End If
End Sub
Private Sub SyncMe(ByVal Item As Object) Dim r As Recipient Dim AmIThere As Boolean = False
For Each r In Item.recipients If LCase(r.Address) = " MyOtherEmail@Someplace.com " Then AmIThere = True Exit For End If Next
If AmIThere = False Then Item.recipients.add(" MyOtherEmail@Someplace.com ") End If
End Sub Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
send an email without confirmation Hello,
I'm trying to send an email trough outlook using its API. Something like:
Outlook. _MailItem oMailItem = (Outlook. _MailItem )oApp.CreateItem(Outlook. OlItemType .olMailItem);
oMailItem.To = toValue;
oMailItem.Subject = subjectValue;
oMailItem.Body = bodyValue;
oMailItem.Send();
The problem is that the send method raises a confimation dialog, that I want to avoid. I do want to use outlook API to send the mail because I want the email in the sent items folder.
Thanks. Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
using VSTO w/ ASP.Net 2.0 Hi,
Newbie using VSTO and developing office applications. The task is to import and export data from and to database, but user can select from a list columns what they want to add, there will be a dialog will appear and allow user to select data to be included in a word document, how can this be done I installed PIA, VSTO2005SE w/ runtime, MS Office 2003 Web Components and will use MS Office 2003 (ver 11.0.7969.0) with ASP.Net 2.0. I tried some links and cannot find Actions Pane Control. What Am I missing Can anyone point me to some sample codes or resources to do this
Thanks in advanced.
den2005 Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
ListObject binding I am using a listobject in vsto excel. it is bound to a collection. when it displaying more than 1 row and than the collection becomes 1 item after setting the binding the listobject shows 2 rows the second 1 is empty. eventhough the datasource has 1 item the listobject shows 2 rows.
can any1 help pls Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Why Excel customer menu only response for one time Hi :
What I want is create a new menu in excel , when the first time click the menu , the code is ok, but click it again, there is no response for event .
Can anybody help me
using System; using System.Data; using System.Drawing; using System.Windows.Forms; using Microsoft.VisualStudio.Tools.Applications.Runtime; using Excel = Microsoft.Office.Interop.Excel; using Office = Microsoft.Office.Core;
namespace ExcelWorkbook13 { public partial class ThisWorkbook { private void ThisWorkbook_Startup(object sender, System.EventArgs e) { Office.CommandBar menuBar = (Office.CommandBar)Application.CommandBars.ActiveMenuBar; Office.CommandBarPopup cmdBarControl = (Office.CommandBarPopup)menuBar.Controls.Add (Office.MsoControlType.msoControlPopup,missing,missing,missing,true);
if (cmdBarControl != null) { cmdBarControl.Caption = "&refresh"; //add menu command
Office.CommandBarButton menuCommand = (Office.CommandBarButton)cmdBarControl.Controls.Add (Office.MsoControlType.msoControlButton,missing,missing ,missing ,true); menuCommand.Caption = "&Caluculate"; menuCommand.Tag = DateTime.Now.ToString(); menuCommand.FaceId = 265; menuCommand.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(menu_Command_Click);
}
}
private void menu_Command_Click(Microsoft.Office.Core.CommandBarButton ctrl, ref bool CancelDefault) {
MessageBox.Show("this is my first menu_Command_Click");
}
private void ThisWorkbook_Shutdown(object sender, System.EventArgs e) { }
#region
/// <summary> /// </summary> private void InternalStartup() { this.Startup += new System.EventHandler(ThisWorkbook_Startup); this.Shutdown += new System.EventHandler(ThisWorkbook_Shutdown); }
#endregion
} } Tag: Visual Studio Tools for Office How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003) Office
Lin Kejian
How to Create a new xls document from Excel addins (VSTO 2005 se / Excel 2003)