Quantcast
Channel: Visual Studio Tools for Office (VSTO) forum
Viewing all 5157 articles
Browse latest View live

Outlook: Unable to cast COM object of type ‘Microsoft.Office.Interop.Oulook.ApplicationClass’

$
0
0

c# code to send e-mail via MS Outlook 2010 developed in VS 2010 works perfect:

1. using Outlook = Microsoft.Office.Interop.Outlook;
...
2. Outlook.Application outlookApp = new Outlook.Application();
3. Outlook.MailItem mail = outlookApp.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;
...

When using this programm on another pc with MS Outlook 2013: following error occurs on line 3:

Unable to cast COM object of type ‘Microsoft.Office.Interop.Oulook.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Oulook._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00063001-0000-0000-C000-000000000046}’ failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Deleting Outlook Interop reference and adding latest version 15 in VS 2013 does NOT help. How can I use Outlook 2013 to send mail? Is it possible to use Outlook 2010 with same code?


format shape text with multiple formats

$
0
0

I am using Visual Studio VB.NET to write a program for Visio.  I would like to add lines of text to shapes, but format the different lines of a shape's text with different font, bold, italics, and font size settings.   Is this possible programmatically?

How to access the CustomTaskPanes property from a shared library?

$
0
0

I am building an AddIn for Word, Excel, PowerPoint. This AddIn comes with a ribbon. Whenever the user clicks a button on the ribbon a custom task pane is opened on the side. Since I do not want to rewrite the same code in three different projects I have a shared project where my ribbon is defined (XML).

Problem: the ribbon callbacks have to access the CustomTaskPanes property.

I have tried to inject the CustomTaskPanes property to the shared ribbon:

public partial class ThisAddIn
{
  protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
  {
    return new Shared.Ribbon(this.CustomTaskPanes);
  }

  ...
}


public class Ribbon : Office.IRibbonExtensibility
{
  private Microsoft.Office.Tools.CustomTaskPaneCollection taskPanes;

  public Ribbon(Microsoft.Office.Tools.CustomTaskPaneCollection taskPanes)
  {
    this.taskPanes = taskPanes;
  }

  ...
}

But at the time when this method is executed the CustomTaskPanes property is null.

Changing the constructor of the ribbon so that we can inject the AddIn to the ribbon does not work, too, since CustomTaskPanes property is internal the code throws an exception:

public partial class ThisAddIn
{
  protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
  {
    return new Shared.Ribbon(this);
  }

  ...
}


public class RecordsRibbon : Office.IRibbonExtensibility
{
  private dynamic addIn;

  public RecordsRibbon(dynamic addIn)
  {
    this.addIn = addIn;
  }

  private void OpenTaskPane()
  {
    // RuntimeBinderException with message: 'ThisAddIn.CustomTaskPanes' is inaccessible due to its protection level
    var taskPane = this.addIn.CustomTaskPanes.Add(new System.Windows.Forms.UserControl(), "title");
    var taskPane.Width = 400;
    var taskPane.Visible = true;
  }

  ...
}

I do not want to change the access modifier of the ThisAddIn.CustomTaskPanes property since it is designer generated code.

What else can I do to access the CustomTaskPanes collection from the shared library?

Word loses focus (minimized) after closing non-modal form

$
0
0

Hi,

I have a problem with the Word Add-in I'm developing. 

The problem:

 If I open non-modal form called Form1, and inside this form I press a button that opens another modal form called Form2. Now I close both forms, but Word windows is losing focus and minimized.When I open a non-modal form (let's call itForm1) by using

Form1.Show(IWin32Window);

Where the IWin32Window object is created by this method:

public static MyWin32Window getWordWindow()   

{           

IntPtr wordWindow = NativeMethods.FindWindowW("OpusApp", Globals.ThisAddIn.Application.ActiveWindow.Caption + " - Microsoft Word");

MyWin32Window myWin = new MyWin32Window(wordWindow);           

return myWin;       

}


The problem occurs when I open another form from Form1, let's say Form2 is opened, but Form2 is modal form and opened with

Form2.ShowDialog();

It works fine, but when I close Form2 and then Form1, the Word window is minimized. How can I prevent this behavior?

I also tried setting Form1 as the owner of Form2, like this:

Form2.ShowDialog(this);

But same result.

Thanks,

Etai.





How to detect the excel is call by powerpoint?

$
0
0

Hi,

I have a VSTO add-in which will prompt user to input file setting (frm.ShowDialog()) when open or save file.  It normally work fine but I got a problem that when user add excel object into PowerPoint silde by ("Insert" -> "Object" -> Select from file -> select excel), the PowerPoint hang caused by waiting the answer of excel prompt but it does not load on screen.

So how can I detect the add-in is called by others application?  If I can know the excel is called by PowerPoint, then I can skip the setting prompt and let it run normally.

Thanks.


calendarw

Button inside an Excel cell and open form on it's click

$
0
0

Hi All,

I am developing a VSTO Excel Add-in and I want to embed an arrow button just like picture shown below and open my own form on it's click.

Any idea?


Attiqe Ur Rehman

How to capture quick click categories and right clicks in Outlook 2007

$
0
0

Hi -

I have been searching for several months for a solution to my problem. Essentially what I have is an add-in for Outlook 2007 that tracks changes for a customer service department and the user that made them. We have multiple reps working in several shared mailboxes. I've got everything working pretty smoothly by using a combination of the explorer.selectionChange and the mailitem.propertychange events.

However, the issue I have is when a user right clicks on the category column in the explorer to bring up the context menu and selects a category (same for tasks). Also when they use the quick click feature. I can't find an event for either one of these when the mailitem that is being changed isn't the currently selected one (since the selection doesn't change by a right click). A couple of things I've tried are:

application.itemcontextmenudisplay event - This only works for the context menu of the mailitem but it doesn't fire when the context menu for the categories column is brought up

Wrapping everything in folder.items to a class that contains a propertychange event - I've tried several methods using this with no real success, mainly because I need to monitor any changes that could happen to ALL items in a particular folder. Since exchange has a 150 mailitem limit at one time this will not work. This method works best by using the items in the explorer.selection but since the selection doesn't change for a right click its a moot point. 

Used XML in Outlook 2010 - this showed the most promise but for some reason the onAction parameter doesn't work for the Categories gallery (if I'm wrong on this please let me know!!). I even considered rebuilding the Categories context menu by making the default menu invisible and writing a script that creates my own gallery. I got the closest with this but the imageMso's for the Category colors are not available for some reason (Again please correct me if I'm wrong).

Ideally, I'd like a solution that would work for both 2007 and 2010 because most representatives still use Outlook 2007 and we haven't fully upgraded everyone. However, I'm willing to consider requiring the floor to upgrade to 2010 if necessary.

Please help!!

How to disable the popup (tooltip) on Ribbon Button

$
0
0
Hello,

I developed a plugin for outlook 2007 that adds a button to the office ribbon.

I wanted to know if there is any possibility (programmatically) to not show the popup message when hoovering over the button with the mouse pointer.

When I hover over the button, a little popup (tooltip) with the following text is displayed: MyAddinName Press F1 for help

Is there any way to suppress this message for this custom button?

Thanks for your help.

Robert

Global Exceptional Handling in Excel 2013 Document Level Customizations

$
0
0

I use Visual Studio 2012 with Update 4 and Excel 2013 Document Level Customization project.

I previously asked this question in MSDN forums with sample code but I could not get precise answer. And the code which I mentioned does not really work.

I found an answer in stackoverflow saying that : You might not be able to, since the application is actually an unmanaged application. You might have to just put try/catch blocks around flaky areas.

http://stackoverflow.com/questions/3770481/trapping-unhandled-exceptions-in-net-excel-addins-xll

Is it possible to implement Global Exceptional Handling for Excel Document Level Customizations?

textbox using builtindocumentproperties

$
0
0

I'm trying to create an addin to incorporate the builtindocumentproperties. I have successfully created the macro in Project VBA. However when I am trying the same in VSTO, I am getting the error. I have tried all possible options, but I have failed.

I am inserting the VBA code for the form & the error which I am getting in VSTO.

Option Explicit

Public Sub cmd_OK_Click() If Me.txt_Project_Title.Value = "" Then MsgBox "Please enter a Project Title.", vbExclamation, "Project Data" Me.txt_Project_Title.SetFocus Exit Sub End If If Me.txt_Author.Value = "" Then MsgBox "Please enter an Author.", vbExclamation, "Project Data" Me.txt_Author.SetFocus Exit Sub End If If Me.txt_Company_Name.Value = "" Then MsgBox "Please enter the Company's Name.", vbExclamation, "Project Data" Me.txt_Company_Name.SetFocus Exit Sub End If If Me.txt_Start_Date.Value = "" Then MsgBox "Please enter a Project Start Date.", vbExclamation, "Project Data" Me.txt_Start_Date.SetFocus Exit Sub End If ActiveProject.BuiltinDocumentProperties("Title") = Me.txt_Project_Title.Value ActiveProject.BuiltinDocumentProperties("Author") = Me.txt_Author.Value ActiveProject.BuiltinDocumentProperties("Company") = Me.txt_Company_Name.Value ActiveProject.ProjectStart = Me.txt_Start_Date.Value Unload Me End Sub Private Sub UserForm_Initialize() Me.txt_Project_Title.Value = ActiveProject.BuiltinDocumentProperties("Title") Me.txt_Author.Value = ActiveProject.BuiltinDocumentProperties("Author") Me.txt_Company_Name.Value = ActiveProject.BuiltinDocumentProperties("Company") Me.txt_Start_Date.Value = DateFormat(ActiveProject.ProjectStart, pjDate_ddd_mmm_dd_yyy) End Sub

 

The error I am getting in VSTO

 

 

InvalidCastException was unhandled by user code

 

An exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll but was not handled in user code

 

Additional information: Conversion from type 'DocumentProperty' to type 'String' is not valid.

PowerPoint embed excel problem

$
0
0

Hi all,

I have an excel add-in, I found that if I add an excel object to PowerPoint, if I double click the excel table in PowerPoint, it will show "The server application, source file, or item can't be found, or returned an unknown error. You may need to reinstall the server application".

Besides, the pptx become unable to save and shown "PowerPoint was unable to open or save this document.  Please ensure that you have access privileges to read or write the document and that it is not encryted.", but it can be save before I add the excel object.

If I try to close the PowerPoint after I added the excel object, it's hang and show "Microsoft Office Excel is waiting for another application to complete an OLE action." until I kill the EXCEL.exe in Task Manager.

I checked that if I disable the excel add-in, the PowerPoint can add, modify the excel and close the pptx normally.  And I tried to mark all subroutine exit sub in first line of called event but still unable to prevent this problem.

If I set Application.Visible and Application.DisplayAlerts = TRUE when event called, the new inserted excel in slide still unable to edit after added but pptx is able to close, and excel application is keep no exit after PowerPoint is quit.

May I check any hints on this problem?

Win7 32-bits, Office 2007 SP3, VSTO 4

Thanks.


calendarw

Creating add-in for Word and Outlook 2013 = two separate add-ins?

$
0
0

Hi,

I'm trying to make an add-in that works for both Word 2013 and Outlook 2013. Since the shared add-in template for Office 2007/2010 is gone for Office 2013, is the solution to make a separate add-in for each application or is there another way?

I'm unclear about what role the VSTO plays. Can you create Office 2013 add-in projects in visual studio without it? In this walkthrough (http://msdn.microsoft.com/en-us/library/vstudio/cc442946.aspx) it's a prerequisite for running an add-in from visual studio.

Regards,
SashT

Can't display extension of newly saved PDF file

$
0
0

Hello,

I have a simple (and rudimentary) program for converting word files to pdf. It's pretty much completed except for one small part...

The selected files are stored in listbox1; when the user clicks the 'Convert' button, the files are saved as a PDF and then the filename is displayed in listbox2. The only part I'm struggling with is displaying the new filename in the second listbox with the pdf extension. It only displays the old filename with the .docx extension (Code for the convert button is shown below).

I'm pretty sure there is a solution for this that I'm not thinking about (having a real brain fart here) and apologize if this has been answered before.

Thanks to all who reply!

Private Sub Convert_Click(sender As Object, e As EventArgs) Handles Convert.Click
        'will convert file(s) to PDF
        Dim oWD As Word.Application = Nothing
        Dim oDocs As Word.Documents = Nothing
        Dim doc As Word.Document = Nothing
        Dim fileCount As Integer = Nothing
        Dim fileName As String = Nothing
        Dim newName As String = Nothing
        Dim name As String = Nothing
        fileCount = ListBox1.Items.Count
        If fileCount > 0 Then
            If fileCount = 1 Then
                MsgBox("1 file to be converted")
            ElseIf fileCount > 1 Then
                MsgBox("There are " & fileCount & " files to be converted")
            End If
            For fileDoc = 0 To fileCount - 1
                fileName = ListBox1.Items(fileDoc).ToString
                name = Path.GetFileNameWithoutExtension(fileName)
                oWD = New Word.Application
                oDocs = oWD.Documents
                doc = oDocs.Open(fileName)
                doc.SaveAs2(Path.GetDirectoryName(fileName) + "/" + name, _
                            Word.WdSaveFormat.wdFormatPDF)
                oDocs.Close()
                oWD.Quit(Word.WdSaveOptions.wdDoNotSaveChanges)
                newName = Path.GetFileName(fileName)
                ListBox2.Items.Add(newName)
            Next
        Else
            MessageBox.Show("No files found. Make sure you select files before" & _
                            vbCr & "trying to convert to a PDF.", "File(s) not found!", _
                            MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub


Join the darskide. We have cookies!

Excel Add-in - Detect when a user is in header/footer edit mode?

$
0
0
I'm looking for a way to detect when the user has placed their cursor inside the header/footer area. 

I want to display a group of buttons on my add-in and have the group disappear when the user is not editing the header/footer. 

I was trying to achieve this using the selection change event and checking if the Header/Footer Contextual tab was visible using the snippet below but the selection change event doesn't fire when the user places the cursor inside the header/footer areas of the worksheet. 
            

Excel.Application xlApp = Globals.ThisAddIn.Application; 

bool enabled = xlApp.CommandBars.GetVisibleMso("TabHeaderAndFooterToolsDesign");


Am I just out of luck? Is there no active way to check for this? 


about word add in loading perfermance

$
0
0

i develop a simple addin which use seven third-part assambly, after deploy in word2013, word2013 startup procedure will be very slow, almost 14 seconds, is any idea to improve the performance?

below is vs output info in word setup.

'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.Runtime\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Office.Runtime.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_zh-Hans_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Applications.Hosting\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Applications.Hosting.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Applications.ServerDocument\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Office.Tools\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.Office.Tools.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Applications.Runtime\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Applications.Runtime.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.Runtime.resources\v4.0_10.0.0.0_zh-Hans_b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Office.Runtime.resources.dll'. Module was built without symbols.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment.resources\v4.0_4.0.0.0_zh-Hans_b03f5f7f11d50a3a\System.Deployment.resources.dll'. Module was built without symbols.
A first chance exception of type 'System.Deployment.Application.DeploymentException' occurred in System.Deployment.dll
'WINWORD.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Cannot find or open the PDB file.
The thread 0x40d8 has exited with code 259 (0x103).
'WINWORD.EXE' (CLR v4.0.30319: Domain 2): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.Runtime\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Office.Runtime.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Applications.Hosting\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Applications.Hosting.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Applications.Runtime\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Applications.Runtime.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Applications.ServerDocument\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Office.Tools\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.Office.Tools.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Office.Tools.Word.Implementation\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.Office.Tools.Word.Implementation.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Office.Tools.Common.Implementation\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.Office.Tools.Common.Implementation.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Office.Tools.Common\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.Office.Tools.Common.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Office.Tools.Word\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.Office.Tools.Word.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Users\洪\AppData\Local\assembly\dl3\TM8K3PEQ.P2B\VAO29J41.8VN\9fca726c\e84b48cf_4a13cf01\com.ware4u.km.connector.dll'. Symbols loaded.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Users\洪\AppData\Local\assembly\dl3\TM8K3PEQ.P2B\VAO29J41.8VN\c5deeca2\00a74ef1_658dce01\Microsoft.Office.Tools.Common.v4.0.Utilities.dll'. Cannot find or open the PDB file.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Users\洪\AppData\Local\assembly\dl3\TM8K3PEQ.P2B\VAO29J41.8VN\bffa88d0\4450cea6_4a13cf01\com.ware4u.km.word.dll'. Symbols loaded.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Users\洪\AppData\Local\assembly\dl3\TM8K3PEQ.P2B\VAO29J41.8VN\af941682\00e70525_c22ece01\Esent.Interop.dll'. Symbols loaded.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Word\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll'. Module was built without symbols.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Windows\assembly\GAC_MSIL\office\15.0.0.0__71e9bce111e9429c\office.dll'. Module was built without symbols.
'WINWORD.EXE' (CLR v4.0.30319: com.ware4u.km.connector.vsto|vstolocal): Loaded 'C:\Users\洪\AppData\Local\assembly\dl3\TM8K3PEQ.P2B\VAO29J41.8VN\92629746\2c8a17ce_4a13cf01\com.ware4u.km.bridge.dll'. Symbols loaded.




Powerpoint add-on project

$
0
0

This is my code for a powerpoint add-on writtin in C# visual studio to pull out hidden text (which will be text in the notes of the slide) in each slide as the slide is visited in a slideshow and convert it to audio. First is to pull out the text in the notes when the slide is visited and display as a message which isn't quite working in the code below.  At the moment when the code is ran it just opens powerpoint and nothing else seems to be working. There might be somewhere I'm going wrong.   I've added the for loop in the events to try to iterate through the shapes to find the one which is the notes placeholder.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using Office = Microsoft.Office.Core;
using Microsoft.Office.Interop.PowerPoint;
using System.Speech.Synthesis;
namespace FirstPowerPointAddIn
{
    public partial class ThisAddIn
    {
         private void ThisAddIn_Startup(object sender, System.EventArgs e) 
        {
            /*  //connect the Application_PresentationNewSlide event handler with the PresentationNewSlide event.
              this.Application.PresentationNewSlide +=
              new PowerPoint.EApplication_PresentationNewSlideEventHandler(
              Application_PresentationNewSlide); */
            
             SpeechSynthesizer synth = new SpeechSynthesizer();
            // Configure the audio output. 
            synth.SetOutputToDefaultAudioDevice();
         PowerPoint.Application oPowerPoint = null;
         try
          {
                oPowerPoint.SlideShowBegin += oPowerPoint_SlideShowBegin;
                oPowerPoint.SlideShowNextSlide += oPowerPoint_SlideShowNextSlide;
           }
            catch(Exception)
            {
                Console.WriteLine("error");
            }
        }
        
        
        
        private void ThisAddIn_Shutdown(object Pender, System.EventArgs e)
        {
        }
     
        private void oPowerPoint_SlideShowBegin(SlideShowWindow Wn) 
        {
            for (int i = 0; i < Wn.View.Slide.NotesPage.Shapes.Count; i++)
            {
                
                // If the slide has notes, get the notes
                if (Wn.View.Slide.HasNotesPage == Microsoft.Office.Core.MsoTriState.msoTrue)
                {
                    if (Wn.View.Slide.NotesPage.Shapes[i].TextFrame.HasText == Microsoft.Office.Core.MsoTriState.msoTrue)
                        System.Windows.Forms.MessageBox.Show(Wn.View.Slide.NotesPage.Shapes[i].TextFrame.TextRange.Text);
                    
                }
            }
        }
        
       
        void oPowerPoint_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
        {
            for (int i = 0; i < Wn.View.Slide.NotesPage.Shapes.Count; i++)
            {
                if (Wn.View.Slide.HasNotesPage == Microsoft.Office.Core.MsoTriState.msoTrue)
                {
                    if (Wn.View.Slide.NotesPage.Shapes[i].TextFrame.HasText == Microsoft.Office.Core.MsoTriState.msoTrue)
                        System.Windows.Forms.MessageBox.Show(Wn.View.Slide.NotesPage.Shapes[i].TextFrame.TextRange.Text);
                }
            }
        }
        #region VSTO generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }
        
        #endregion
    }
}

are VSTO solutions stable ?

$
0
0
I work in the financial services industry and have been developing in excel VBA for a while. I've been following VSTO since day 1 but have not started using it in production. I tried using it last year and my visual studio crashed a couple times and i left it at that.

I just want to ask around if people have been using excel VSTO, deploying those apps on multiple computers and have they been comfortable with it ? Are their any particular concerns people have ?

Thanks

VSTO: Hide/Show items in the OfficeMenu (Excel 2007)

$
0
0

I use a designer based ribbon (not a XAML based one) in an Office (Excel) 2007 application. With the flagStartFromScratch I can hide most of the commands in the OfficeMenu. What can I do to hide the rest of the commands ("New", "Open", "Save")?

How to disable/hide

Traverse through recognised smart tags

$
0
0

Hi,

I able to create smart tags using the easy way as in “http://blogs.msdn.com/b/eric_carter/archive/2008/07/10/creating-application-level-smart-tags-in-vsto.aspx”.

I would like to highlight all smart tag recognized terms/words or traverse through them, is there way we can modify the recognizer?

I use, Word 2010 & Visual Studio 2010.

Regards,
Hariharan, C.

Best Practices for using InfoPath with VSTO

$
0
0

Hi there...

Can you please suggest what could be Best Practices for using InfoPath with VSTO?

If you can provide some link relevant to the topic, will be useful.

Thanks in advance.


Viewing all 5157 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>