How to create a task pane using C++/COM in MS Office? - com

I know Office add-ins can be created by
Office.js
VSTO
COM
I implemented an add-in before using VSTO, after searching for the information on how to do that on the Microsoft website, I get nothing. Is it lost how to create Office add-in using C++/COM technology? I know some software still use COM add-ins, such as Grammarly, TeamViewer, FoxitReader. But how to create a COM add-in? Some ideas? Thanks.

Related

Microsoft Visio | How to perform VSTO (or alternative) from a Server

Objective:
I have a Web Application.
I have some Microsoft Visio files present in my Application.
I want to process (edit/export/print) these Visio files (Note: Opensource tools like LibreOffice Draw are not giving the same quality like Visio)
Current Progress: I got to know about Microsoft VSTO and achieved some basic operation by using VSTO
Sample code of VSTO
string docPath = "input.vsdx";
this.Application.Documents.Open(docPath);
int pageIndex = 1;
Visio.Pages visioDocPages = this.Application.ActiveDocument.Pages;
if (pageIndex <= visioDocPages.Count) {
// Use `visioDocPages[pageIndex]` for some processing
}
this.Application.ActiveDocument.Close();
Queries:
VSTO seems to be an Automation library, so I fear it will fail when multiple files needs to be processed from a Server
Are there any other methods to work on visio (like edit, export, print, etc) from a Server environment
Am looking for either officail Microsoft packages OR Open Source ones (NOT looking for paid packages like https://products.aspose.com/diagram/net/)
VSTO is a layer on top of the COM addin API useful only for developing Office addins. It cannot be used from external applications.
No Office applications (Visio included) can be used from a service (such as IIS). Look at the Open XML API (https://learn.microsoft.com/en-us/office/client-developer/visio/how-to-manipulate-the-visio-file-format-programmatically) - it will let you manipulate vsdx files without Visio.

How to get the current running office instance version number using VBA?

I am developing Microsoft Office Add-in, I have to read the registry values of the current instance of the office in which my add-in will run.
Is there any way I can get the current office version number of add-in instance?
I have searched and found this solution. But it's is not working.
Thanks if anyone from you can help.

VBA code import

I have a VBA project I am doing in excel. I will have many workbooks that will use the same code and I do not want to have to copy the code to all the workbooks if I make a change. Is there anyway to have the code in one central place and then have all the workbooks access that code?
Yes, you have two options
1) Copy and paste the code in the Personal workbook.
More details here
Topic: Deploy your Excel macros from a central file
Link: http://office.microsoft.com/en-us/excel-help/deploy-your-excel-macros-from-a-central-file-HA001087296.aspx
2) Create an Add-In
Mode details here
Topic: Creating An XLA Add-In For Excel
Link: http://www.cpearson.com/excel/createaddin.aspx
Note: You can create Add-In in VBA as well as Visual Studio. For COM Add-Ins (created using Visual Studio), please refer to this link.
Topic: Office Development with Visual Studio (VSTO)
Link: http://msdn.microsoft.com/en-us/office/hh133430
HTH
Sid

Adding Outlook Object Library to Excel 2011 for Mac

I am trying to move a VBA macro code from Excel 2003 to Excel 2011.
The macro requires sending an Email from Outlook. However, when I went to Tool > References to add the Outlook Object Library, it does not show up in the List box.
How do I go about adding the reference in so i can access Outlook?
As of my knowledge Office Automation in the MAC world is somehow limited. Please see this discussion. Also this one in a Microsoft Forum..
You can add reference by using Browse option.
You just need to add reference to the file "MSOUTL.OLB"
In my system I have it in "C:\Program Files\Microsoft Office\Office12\MSOUTL.OLB" , In your system it could be in different folder.

Office 2007/2003 VSTO Shared Add-In Design Query

I am designing a shared add-in using VB.Net 2008 and VSTO that has to fire up when any MS Office App is started. It has to work for both 2002, 2003 and 2007 applications. I have managed to put together a working add-in that pops up a test message stating the version of Office and the Application name and tested this across all the apps ok.
The next part of the solution is to code the application specific code that needs to run for document auditing and corporate protective marking as well as, for example; in Excel checking that all the Add-Ins are linked to the Network Add-Ins folder.
My approach from now was going to be to late bind against the application object and set one of my typed (e.g. Excel) application object references which exist in the code to this object.
I'm still relativly new to VSTO so if I am doing something odd please can you let me know! :)
Ta.
I have completed this project and did it the way I specified using late bindig. It works lieka dream for all office apps both XP and 2007. :) I feel like I am announcing this to myself though as I didn't recieve a single answer or comment. Maybe you should have sexed up the title a bit Mas. Yeah maybe I should.