I am building an Excel Add-in with the Office JS API. Is there a way to handle printing with the Add-in or open a printing window?
I have been going through the documentation but can't find any methods for this. Am I missing something?
Edit: To be more specific, I want to open the Excel print dialog with the Add-in.
There is no API in Office.js to invoke the Excel print dialog. If you know that all the users of your add-in will be working on Windows machines, using desktop Excel, you might look into whether a VSTO/VBA add-in has this feature. But if some users will be using Excel on the web or Excel on Mac, you'll have to stick to an Office.js add-in. In the later case, the best you can do is have your add-in prompt and/or instruct users to print from the Excel UI. You can have some control over the layout of the worksheet when it prints. See Work with worksheets - Page layout and print settings for more information.
You can suggest that Office add-ins be given access to the print UI at Microsoft 365 Developer Platform Ideas, but I suspect that security concerns would make it unlikely that Office.js-based add-ins, which are web applications, would be given that feature. The JavaScript/HTML that is hosted by a web application can be changed by its creator after the add-in has been installed by a user and/or approved by an administrator. This makes it possible for a rogue add-in creator to change the behavior of the add-in post-installation.
Related
I'm developing an Office 365 Mail Add-in in Napa and want to set the app icon. There is a manifest XML file that can include an IconUrl element, but the Napa platform doesn't provide an avenue for uploading my manifest.
Is there a way to set the icon using Napa? If not, what can I use to deploy a version of my add-in to my test account with the updated manifest?
I would highly recommend that if you are ready to custom your manifest, you should consider using Visual Studio 2015 Community with Office Developer Tools. Napa is a lightweight playground for exploring and trying out the Office Add-ins quickly and I think you'll find that you have a lot more power in VS.
If you are using a mac, download your project from Napa and you can use any preferred development environment (instructions on how to debug with a text editor).
Thanks for asking and please feel free to reach out again if you have any more questions!
Nicole, Program Manager for Microsoft Office Development Tools
Generally you would reference the icon image in the manifest just as you would reference image files in .html pages in your solution. For example, store the icon in the Contents or Images folder and reference it using virtual paths. It has to be stored on the web server whether your .html, .js and .css files are located.
Note that the only place you really upload your manifest is within the Addin management pages within your Mailbox or via the Exchange Admin Center pages.
Need to convert .doc/.docx file to .htm file to display on webpage in my MVC web application. This is working in my local system. There is no Microsoft Office Installed in the server and its restricted to install this in the server.
Is there a round-about solution for this? Can I convert .doc file to .htm file without having MS Office installed.
Any suggestions.. Really stuck with this for the past 4 days.. Cant find any solutions.
Thanks
Yes, you can. Take a look at the third-party components (for example, Aspose).
Also you may consider using the Open XML SDK. See Welcome to the Open XML SDK 2.5 for Office for more information. But it doesn't support binary files such doc etc.
Be aware, Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
You can read more about this in the Considerations for server-side Automation of Office article.
I am trying to see if you can use Microsoft Access Services, as available in Access 2010, to synchronise data between an MVC web app, and a Microsoft Access desktop solution.
If you publish the Access app backend via Access Services to a sharepoint. This works fine, and you could use Web Databases to use that, but... sadly, there are limitations to Web Databases.
So, if I can get the data into SharePoint lists, and these lists will synch with the Access tables, then all I need is to access the sharepoint lists from the MVC app, hey presto, you have an MVC app that synchs with an Access desktop app.
So the questions are:
Will the above idea work?
And:
How do you access sharepoint lists from an ASP.NET MVC 3 app?
In an attempt to answer this myself, I came across the following:
On MSDN, there is an article on Linq to SharePoint. As I understand it, this intended for use in SharePoint, but there seems no reason why this could not be used from an MVC app, EXCEPT that there is no available reference Microsoft.SharePoint.Linq from Visual Studio 2010 Professional.
Presumably, this reflects the fact that the Microsoft.SharePoint.Linq namespace is only available to code running in a SharePoint site?
Which would leave third party tooling, unless there is a native way for .NET to access SharePoint lists. In that respect:
Is there a native way for .NET to access SharePoint lists?
And:
Do you know of any third party library or code samples for accessing sharepoint lists from an MVC 3 app?
Presumably, someone has already tried to do this. So:
Do you know of any links to read more on this subject?
To get the Microsoft.SharePoint.Linq namespace just install SharePoint server Trial(on a virtual machine preferably) and then copy the DLL from the C:\Program Files\Common Files\Microsoft Shared\Web Server Extension\14\ASAPI\ directory to the BIN folder of your MVC3 Application and reference it within your project.
To query the SharePoint list you might need other DLLs which are in that folder as well(by the way the \14\ directory is AKA "The 14th hive").
I tried out UI Automation for WPF testing and it works very well for us. Now I want to use UI Automation test for our custom microsoft word addin (which includes a ribbon tab and other controls) but I am unable to find information regarding to how to do it in UI Automation (For example how to click on the custom addin tab on the ribbon). Any help would be greatly appreciated.
Thank you
Think of using one of the following if available
Codded UI test - visual studio 2010 has it
Microsoft Test Manager has action recording and you can use that.
figure out the shortcut keys for your add in and you may use http://www.autoitscript.com/site/
Hey everyone.. This is my first time writing an ASP.NET MVC web app, and it's going good. I have no problems there. What I don't have any experience in is SSRS though. Ultimately I want to be able to render reports on my ASP.NET MVC app.
I got the report server installed and running, and it's visible within SQL Server Management Studio.
I created a test report (.rdl) via Business Intelligence Development Studio, and published it to my report server. It's now there, I checked.
My question is how do I tie that into my main application? Do I have to add a reference in my main application to be able to retrieve the report I created? I'm totally lost- I have my main database and my report server both visible within SQL Server Management Studio. That's as far as I got... help???? Thanks in advance..!
Try this: http://geekswithblogs.net/stun/archive/2010/02/26/executing-reporting-services-web-service-from-asp-net-mvc-using-wcf-add-service-reference.aspx
Failing that, if you are new to ASP.NET MVC and you do not specifically require MS Reporting Services (.rdl) created through BI Development Studio, but are satisfied with a standard Visual Studio Report (.rdlc) (This simply means the report may be more or less linked only to the single app. You create these via Visual Studio Project - Right Click -> New Item -> Reporting -> Report) take a look at this link (http://www.danielroot.info/2009/06/how-to-render-reporting-services.html), even though it states how to link Reporting Services, he actually means standard reporting .rdlc files. In essence it publishes simply the output from an .rdlc report as a .pdf and stream it to your user, I have found it to be incredibly simply and a powerful way to quickly publish reports.
Failing that a hybrid of both implementations might allow you to stream your Reporting Service .rdl correctly.
Good luck.