And what I actually I see(just Word document without button, TextBox(DocumentActions)):
Guys, does anybody know what I am doing wrong? I would like to see Buttons and TextBox.
Hello, we have a windows service that does the mail merge from SQL to word. It was working perfectly when it ran on windows server 2003 R2 (32bit) with Office 2007. We tried bringing the service to windows server 2012 R2 (64bit) and using Office 2013 - but the service keeps crashing with the following error "Object reference not set to an instance of an object" when it runs this line of code:
wordMailMerge.OpenDataSource(Name:="" _,Connection:="DSN=MailMerge" _,SQLStatement:="EXEC dbo.uspGetPrintBatchMergeData {0}" _,SubType:=WdMergeSubType.wdMergeSubTypeOther)
I installed the interop word dll for all version of office since 2007 and I tried using different word interop dll with no luck. The windows service user has admin rights on the server. I can see a word instance being created in task manager but it just hangs and use up resources. Also I tried compiling my windows service targeting x86 and x64 but that also didn't change anything. I ran the same service on my box (windows 8.1 64bit with office 2013) and it worked.
I would appreciate any help!
Thanks,
Patrick
I create an new project based on Excel 2016 or Word 2016 in VS2015 Community.
When I save and reopen I get ExcelWorkbook1 (incompatible)
'This project is incompatible with the current edition'
'You do not have a version of Office that is supported with this version of Visual Studio. Please install Office 2010 or greater then try again.'
I have tried reinstalling everything multiple times. I have this on both Server 2012 and Windows 8.1
I upgraded from Office 2013 + VS 2013 where everything was working fine.
And: when I remove ExcelWorkbook1 from the solution and add again as existing project, project loads fine. Only to find the problem reoccur after saving and closing VS2015.
Hi ,
I am using Excel add in as Presentation Layer. But Business Layer , Data Access Layer and Entity framework is using with C#(web). During my development time, the excel add in tab and COM add in is appearing in excel file. But after I have created setup file installer and installed on the user machine, the excel com add in doesnot appear in excel option > add in side. May I know why COM add in is not appearing and I am really urgent to solve this issue, kindly help to reply me.
I've done all the steps to create setup file according to the following link:https://msdn.microsoft.com/en-us/library/cc442767.aspx . The setup file is successfully created and able to install at user computer, as well as the application folder path and necessary registry keys are properly added, just that the COM add in is not appear in Excel add in and also not able to add manually. When I add manually add COM add in (.dll) file, there is a error message that " ##.dll" is not a valid office add in.
May I know how can I solve this issue?
Thanks,
SY
I'm creating an Add-In for Outlook and want to sign my project (the .vsto-file) with a certificate.
For that I use "Sign the ClickOnce manifests" in the properties of the project in Visual Studio 2015. With choosing "Select from File..." I can select my .pfx certificate. It's password protected, so a dialog will open asking for the password. All this works fine! I can build my project and my .vsto-file is signed with my certificate.
The problem is in building my project using TFS 2015. I get following error:
C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (2883, 0)Unable to find code signing certificate in the current user’s Windows certificate store. To correct this, either disable signing of the ClickOnce manifest or install the certificate into the certificate store.
I already installed the certificate on the TFS (on local machine) by double-clicking it. But it doesn't solve my problem...
I already tried to installed Windows SDK 7.1 (like recommended in another post). Actually we have SDK 8 on TFS. With tryin to install SDK 7.1, I got the error, that I have just a pre-release version of .NET 4.0 installed. So I tried to install .NET 4.0, but I got the error, that this version is already installed...
I already tried to use "Sign the assembly" with choosing a strong name key file in Visual Studio. But I got the error, that the certificate and the private key cannot be found for the decryption...
I already tried using a certificate without a password. This works fine with building on the TFS. But this is no solution in my case...
I would be so thankful to get help :)
Guys, I've read this article and I am amazed by opportunities of VSTO. It is really cool. Now I want to create some user controls(WPF) and insert data to a Word
document at the specific places like that:
I will have three WPF TextBox'es corresponding to placeHolder_* and a button which will read data from TextBox'es and insert text into placeholders. What code should I write to achieve this?
Any help such as example, tutorials which will be greatly appreciated!:)
hi folks,
i want to add a gallery in my ribbon. i added som items but when it came to handle the events, i couldnt find any selectionchanged event. there is only click event.
am i doing something wrong?
Dig your well before you are thirsty
I've managed to create and show in "Word.dotx" file an ActionPaneControl. Now I am trying to get bookmarks from the "Word.dotx" file from code-behind ActionPaneControl.What I call bookmarks are just strings in the quotes("bookmark1", "bookmark2", "bookmark3"):
Hello, World! "Bookmark1" is trying to improve his coding skill in VSTO. He like playing "bookmark2", moreover he likes spending time reading books. For example, "bookmark3" and it is the favourite book of "Bookmark1".
My question is how can I get bookmarks and replace text from codebehind of ActionPaneControl?
I've tried this code, but I even compile it:
private void button1_Click(object sender, EventArgs e) { Document vstoDocument = Globals.Factory.GetVstoObject(this.Application.ActiveDocument); }and error message says:
Office 2016 Project VSTO
I am publishing an add-in to a test server. The first time the add-in is loaded, nothing happens. I've traced this to Office.initialize. I've waited for a response for 20 minutes before but it was still on the same initial screen. If I hit refresh once even after 1 second, it refreshes and continues like it should.
I thought I had a workaround for it using $.ready(), but not even $.ready() gets called the first time.
If the add-in is refreshed even once, it loads fine until the cache is reset.
I've also tried:
I've had this issue for a month or so and I haven't gotten any closer to solving it.
As with most things, it's far from preferable to add a message that says 'Hey you, if you wanna see something awesome hit refresh!'
Does anyone have any suggestions on how to fix this? Has anyone ever even encountered this?
Thanks
I have a VSTO addin that opens a custom dialog form.
[Edit: Windows 7, Office 2010, Visual Studio 2015.]
When I open the form from a Toolbar (in a test function) it works well; the form opens, gets the focus, the user clicks a button, focus come back to Word, and the user can continue to type.
But when I open the form from a keyscanning code I have running (hooked to WH_KEYBOARD), focus is not restored to the Word document when the form closes. The user has to click in the Word name list to start typing.
That is weird in itself since the call to open the form is made in exactly the same way, with the exact same arguments, and if anyone has a suggestion for that issue it would interesting to hear that as well. But I digress - back to the issue at hand.
I've been trying to fix the issue by activating the Word window with
Globals.ThisAddIn.Application.Activate()
, but it makes no difference. In a way I understand that, because the window name listlooks like the application is already active. On the other hand, it works if the user manually clicks the name list - does that do anything else except activate Word?
I have tried adding
Globals.ThisAddIn.Application.Documents(1).Activate()
as well (yes, I realize Documents(1) is not a longterm solution but in testing I only have one document open) but it makes no difference.
After googling a bit, I've found the advice to use DoEvents, so I've tried adding
System.Windows.Forms.Application.DoEvents()
with no luck. Do I need to activate the application and/or document window differently? Set focus to something?
[Edit: Oh yeah, this question is kind of a duplicate of https://social.msdn.microsoft.com/Forums/office/en-US/62d03be0-f4f5-49eb-9da2-63a8bd1b2a3f/how-do-i-make-the-word-window-active?forum=worddev#cdc371c1-be3a-4d01-9ca3-105677efb6b6 but that
never got resolved, so...]
How do I show / hide a VSTO add-in Ribbon depending on what workbook is active? So I have an add-in that a user needs only when certain xlsx-file is activated and when not, I want to hide the add-in (at least the ribbon part of it).
If I can select, I'd like the answer in VB.Net, but I can manage with C# too.
selam alazar simachew
Hi,
I am developing an Outlook Add-in using c# on .NET 4.5.2. I wanted to know what is the minimum version of the VSTO runtime that is needed, which will work on .NET 4.5.2.
I know there are many versions under VSTO 4.0, but i need the exact minimum version like 10.0.40820 or 10.0.60724 etc. Is there any page or wiki where I can have a look at all the VSTO runtimes released till date? That would be great.
Regards, Kiran
Hello all,
I'm trying to a activate a custom RibbonTab when a workbook is loaded. Below is the code which I am using:
private void myRibbon_Load(object sender, RibbonUIEventArgs e)
{
this.RibbonUI.ActivateTab("tabCustom");
}
However, I get the error "Value does not fall within expected range."What am I doing wrong? Please advise if there is an alternate option of doing this.
Thanks,
I am developing an outlook add in which syncs mails to other server.
I need to display status i.e how many mails have been synced to server, on status bar.
Is it possible to do?
If yes then please show me the ways..