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

PowerPoint 2013

$
0
0
When using Slide Show if i pause on a slide for too long it closes slide show.  How can i fix?

KB3001652 - what was wrong with the first version on MU?

$
0
0

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_update/kb3001652-visual-studio-2010-feb-10-2015-windows/589eee8e-cb6c-424e-b061-b6c6e207bc38?page=5

On February 10th, KB3001652 was released that hung systems.  It was pulled, apparently redone, and then rereleased.  This second version installed and did not cause issues.

This update was originally released back in October and only placed on MU/WSUS in February.  There was no notice it was to be released in February.

My questions are - what is the root cause of the freezing that occurred with the original version of the update KB3001652?  Why wasn't this discovered back in October?  What assurances are being taken to ensure that whatever the root cause was, they will not occur again with any future patches to this platform.

If there is a more appropriate venue to ask in, please let me know.

Publish two different solutions into one

$
0
0

Hi All,

I have an add in solution that i created using vs for ms office in c# , before this solution gets started i want to run a console application so , i added a console application by addling an existing solution(from the menu) in visual studio.But how do i publish both these solutions as a single exe solution.

Regards,

Apoorva

Can't Create New Excel Project Visual Studio 2013 Office Tools The Project Cannot Be Created

$
0
0

I am having this issue on two computers. If I try to create an Excel 2013 Workbook C# in new projects, and choose create a new workbook, it starts to open Excel, and then I get this error in VS

I have tried:

  1. Uninstall & Reinstall of VSTO from the Visual Studio Installer
  2. Uninstall & Reinstall of Visual Studio 2013 Ultimate, (manually removing anything with visual studio that was left over)
  3. Manually turning on the add-on Visual Studio Tools for Office Design-Time Adapter for Excel
  4. Installing VSTO by hand
  5. Enabling Macros
  6. Running VS as administrator
  7. Uninstalling & Reinstalling Office 2013 Pro Plus OLP

I have made this change to excel:


Like I said, this problem occurs on TWO pc's.  I have tried 2013 Visual Studio R1 and R2.  Does anyone have any ideas?

Edit 3-1-2015

There is still no answer to this, I have tried target frameworks:

  • 4.0
  • 4.5
  • 4.51

And Running as Administrator.  Recently I upgraded to the CTP of Visual Studio 2015 Ultimate and the same problem exists.


Event for RibbonTab click in Excel Addin

$
0
0
Hi,

I am working on an Excel Addin. I am using VS 2008 and Excel 2007.
Currently my addin gets loaded on opening of Excel. Since i have a dropdown in the Ribbon, even that gets loaded on openeing of Excel. And since that loading of dropdown takes time, i wanted to change this behavior. I wanted to load my Addin on click of the
Ribbon Tab. For this i wanted to know how to fire the event on click of Ribbon Tab.

Usually ThisAddIn_Startup() is the method that's fired first when excel is opened. But i want to call this method in the event of Click of Ribbon Tab. Is this possible?

basically i want to capture click event of Ribbon Tab.

Can someone please help me on this.

Regards,
Shailendra

Highlight a bookmark on hover, word 2007/word 2013

$
0
0

1)Is there a way to highlight a bookmark in word.

Also I might have more than one bookmark surrounding a phrase, and I want to highlight them based on the the type of book mark in differernt color.

Or

2) can I have a tooltip, that would tell some custom information when hovered on a bookmark.

Thanks,
Ramesh

Opening a New Office 2007 Document using Visual Studio 2010

$
0
0

 

I've been attempting to open a Word 2007 document using Visual Studio 2010.  I'm not sure where I'm going wrong, this is my code so far:

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oWord As Word.Application Dim oDoc As Word.Document 'Start Word and open the document template. oWord = CreateObject("Word.Application") oWord.Visible = True oDoc = oWord.Documents.Add oWord = CreateObject("Word.Application") oWord.Visible = True oWord.WindowState = Word.WdWindowState.wdWindowStateMaximize 'this opens document. Use document file name in the open statement oWord.Documents.Open(txtFileName)

End Sub

 

 

End Class

The problem appears to be with the "Dim oWord As Word.Application" line.  Visual Studio is not recognizing "Word.Application".

Thank you.

 

 

 


James Hutchinson


FatalExecutionEngine error with 0xc0000005 Error Code on passing string array from vba to VSTO

$
0
0

Hi,

I am getting FatalExecutionEngine error with  0xc0000005 Error Code on passing string array from VBA to VSTO.

My interface in C# is shown below

   [ComVisible(true)]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [Guid("AAF48FBC-52B6-4179-A8D2-944D7FBF264E")]
    public interface IInterface1
    { 

       void SetStringArr(ref string[] str);

}

While setting array from VBA as shown below,it gives me above FatalExecutionEngine error.

Dim str(0) As String

Call class1.SetStringArr(str)

Please provide some assistance for the same.

Thanks.


How can I know the name(s) of font from built-in font dialog from Word VSTO AddIns.

$
0
0

Hi, All !!

 

I would like to extract some values from the built-in font dialogbox "wdDialogFormatFont" through VSTO AddIns.

 

Figured out short codes;

 

Microsoft.Office.Interop.Word.Dialog F_DLG  =  Globals.ThisAddIn.Application.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogFormatFont];    

F_DLG.Show();

MessageBox.Show( F_DLG.FontMajor.ToString() );

MessageBox.Show( F_DLG.FontHighAnsi.ToString() );

 

Ther last two lines (red ones) do not work at all.

How can I know the name of the fonts ? (English and Non-English)

.

In VBA, it works beautifully.

.

Thanks !!


MageUI - Signing a mainfest file with a certificate located in the Local Computer Certificate Store.

$
0
0

Hi. 

We have a code signing certificate with the private key stored in a HSM. The certificate is located in the Local Computers certificate store. (All administrators have been given access to the private key).

When using MageUI this certiciate does not show in the "Sign with stored certificate" dialogue, this actually goes for all code signing certificates located in the Local Computer Store, keys in HSM or not. But if i create a code signing certificate in My Personal (Current User) Certificate Store, its shown in the list.

Is there any way to use a code signing certificate that is located in the Local Computer Certificate store with mage? If so, how? And if not, why?

Best regards

Eirik


Excel 2013 Add-in: Custom Task Pane Visibility Problem

$
0
0

* Windows 7

* Visual Studio Community 2013 Edition version: 12.0.31101.00

* .NET version: 4.5.51650

* Microsoft Excel 2013 (15.0.4693.1000) MSO (15.0.4693.1001) 32-bit

* Microsoft Office Developer Tools for Visual Studio 2013 (November 2014 Update)

* Developing a VSTO Excel 2013 Add-in

I have been having problems showing custom Task Panes, but only on certain computers. Changing the Visible property does not show the Task Pane. After much searching, I found someone else that solved this problem (http://stackoverflow.com/questions/24577747/excel-custom-task-pane-not-showing) by disabling other Add-ins. For that person, the offending Add-in was Analysis Toolpak. The Add-in disabling solution worked for me also, but in my case it was Andy Pope's "RibbonX Visual Designer".

My point: This is a *major* problem affecting VSTO development. The fact that it's not a consistent Add-in causing the problem tells me that the real underlying cause is somewhere in *my* VSTO Excel Add-in.  Having to disable *all* other add-ins in order to get mine to work reliably does not sound like a real solution.

I will continue to look into this but, in the meantime, has anyone resolved this problem with a solution other than "disable other Add-ins"?

Thanks,

Mark

READING MULTIPLE EXCEL FILES AND RECORDING THE COUNT

$
0
0

Hi,


Can anyone help me with this? I want to read multiple excel files(in a Network location, which i am accessible to) and record the row count of each in another excel file.

Excel Automation with Interop - Windows Service - Microsoft Excel cannot access the file

$
0
0

I have a windows console application, which automates Excel. In our scenario the application gets called from a Windows Service. If the console app is executed directly everything works fine. If the console app is executed through the Win Service, we get the following error when trying to open the excel file:

Unhandled exception Occured : 'Microsoft Excel cannot access the file 'bla.xls'. There are several possible reasons:
The file name or path does not exist.
The file is being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.'.'

The code snippet used to open the file:

xlApp = new Application();

xlApp.Visible = false;

xlApp.UserControl = false;

xlApp.Application.ScreenUpdating = false;

xlApp.DisplayAlerts = false;

xlWorkbook = xlApp.Workbooks.Open(

Filename: filePath, 

UpdateLinks: 2, 

IgnoreReadOnlyRecommended: true,

Editable: false);

The console app and windows service are running on a Win Server 2008 64-bit OS with Excel 2013 32-bit installed. The service is running with a special user account, which has all the right permissions on accessed files and folders. The excel process is also started with the same account (I cheched that one). 

I already tried to do the following, but to no avail:

Run excel.exe /automation -> worked fine

Created the folders and also gave full control to the account under which the service is run (even gave full control to Everyone)

C:\Windows\SysWOW64\config\systemprofile\Desktop

C:\Windows\System32\config\systemprofile\Desktop

Configured DCOM

Excel Application -> Identity -> Specific user account

Excel Application -> Identity -> Interactive User

Excel Application -> Security -> Launch permissions -> Everyone full control

Several combinations of the above

So I really am stuck with this problem right now. Any input on this is appreciated.

Copying word document content to a rich text box without losing format

$
0
0
I am trying to copy the contents of a word document which is basically in a letter format.
I am trying to copy it onto a rich text box editor...but when i copy it..i am losing all the formatting of the word document.

How do i solve this?

click event for check-box/toggle button firing automatically in Excel add-in project

$
0
0

I just created a test excel-addin project with only one control (toggle button). I set the publish option to Load On Demand (as shown in the screenshot below). The checked property for the toggle button is set to True in the designer. If I now build this and open excel, close and reopen excel, the click event is auto-fired. 

On the other hand, if chose Load at startup option, this does not happen.

Any suggestions how to stop the auto-click event or any work around

because I need to set the checked property of the togglebutton on ribbon_load but cannot do so without click event getting fired automatically.

Here is my code:

namespace ExcelAddIn1
{
    public partial class Ribbon1
    {
        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {                   
        }
         private void toggleButton1_Click(object sender, RibbonControlEventArgs e)
        {
            toggleButton1.Label = "inside";
        }
    }


Problem about installation directory of VSTO addin

$
0
0

Hallo,

our Addin can be installed successfully in any subdirectory under "%ProgramFiles(X86)%". But if we try to install it in customized directory, e.g. "C:\temp\addin". Then all the files are copied but it has an manifest error by starting Word and then addin can not be loaded.

"Application manifest has either a different computed hash than the one specified or no hash specified at all."

Can Addin only be installed in programm directory or can the manifest be adapted, if yes, how can we do it in Visual Studio?

Thanks very much!

BR

Jie

add text at bottom of last page

$
0
0

Using VS2010 Word 2007 -

Is there a way to add text to the bottom of the last page?

Thanks

Rose Anna

How to copy UserProperties from origin message when doing reply, forward or reply all?

$
0
0
is there a way to auto copy the UserProperties from origin message when doing reply, forward, reply all or any other operation? (if exists)

vb.net word defaultcellmargins

$
0
0

I'm creating a word document with several tables. I would like to be able to change the cell margins for the tables.

In Word, I would go to Table Properties Options and fill in the top, bottom, right, left margins.  Is there a way to do this using vb.net?

Thank you

Rose Anna

 

Event Handler for Outlook.Explorer.InlineResponse += gets lost after a while...

$
0
0

Hi, 

During development for Outlook 2013 I noticed that then assigned delegate for Explorer.InlineResponse sometimes during the outlook session gets lost, that is stops being called when a user presses "Reply" on an E-mail. Could it be that the Explorer object has changed? and if so, when would one get a trigger to re-assign the delegate to the new Explorer.

Following code is run on AddIn.Startup to hook-up the InlineReponse event

      foreach( Outlook.Explorer exp in Application.Explorers ) {
        exp.InlineResponse += exp_InlineResponse;
      }

And it works fine in the beginning after starting up. 

Also there is a try/catch in the Delegate, so no unknown exceptions are thrown up, that could cause issues with the event hook/explorer.

Best regards,
Daniel Halan

Viewing all 5157 articles
Browse latest View live


Latest Images

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