Ms Word save to Web Functionality in the Office 2010 - c#

I want to write a code in c# for adding save to web(custom url) for saving word documents, for this microsoft has explained some registry editing here
http://msdn.microsoft.com/en-us/library/office/ff709802%28v=office.14%29.aspx
first thing i want to know is, i am not able to know where these files would be saved after editing registry, means where is the url i am giving to save files, i have edited registry directly without any code, i am able to see save to gmail option,in ms word, but not able to sign in, so what went wrong with me in that
second thing i want to know, how to create web service for the saving word document, i am totally new to web service.
if anyone can help me with the code of web service and explaining the details of first question, please help
thank you

Related

Outlook plugin which required user input while installing

I am trying to create an Outlook plugin which will ask the user couple of Question like URL/Username etc when they try to install the plugin. Then want to save those data in a text file which can be access later on when needed.
Can someone please help me with this. I am very new in Plugin development.
Thanks
If your adddin is not configured on startup, display the necessary prompts when it is used for the very first time.

Where will using Interop fail? Don't use Office.Interop if Office is not installed. late binding?

My windows forms application uses Novacode DocX to write a document from a template. The Novacode portion of the project works perfect and the file saves. The issue is that when I load the document the field/s (Table Of Contents) are not updated when the Novacode portion adds headings and such.
I could, and did, write a macro to update fields on open. This would solve the problem, but not everyone that will use my application will have this macro. I can't save the file as a .docm file with the macro attached for various reasons (assume file must be ".docx").
What I've found is that the Microsoft.office.interop.Word assembly will allow me to call "Fields.Update". My understanding is this will do the trick, but I can't block users that don't have word installed from running my application. My understanding is that if I am "Using Microsoft.Office.Interop.Word", or have it in my references that the application won't run if someone doesn't have word.
So I have code that checks if word is installed. If I run this, and it is installed, can I then use "Late Binding" to run interop code? Other related questions, have replies that point to "NetOffice" as a way to run interop without checking if word is installed.
I'm trying to make this as comprehensive as possible with my research. My question is very similar to this one "
how do I easily test the case where my C# application can't find an external assembly?". I would hope this issue can soon be solved for everyone, but I'm not sure it will be.
Side note, if anyone knows a way to update the fields, or even just the existing TOC, of a word document that is saved in the ".docx" format without having word installed that would be awesome to know, and would circumvent my whole issue. Although I would still like to know the answer to the interop question.
Also this is my first real question on StackOverflow, if you have tags to suggest please do so along with your answer. If you have feedback on how I ask my question, I will accept that too, but please don't close/delete the question without any answers. I linked to questions that are similar, but those questions have not gotten responses in a while. I believe I have done everything according to the rules.
This is more of an answer to your "if anyone knows a way to update the fields, or even just the existing TOC, of a word document that is saved in the ".docx" format without having word installed" question, but you might want to look in to the Open XML SDK for Office.
This will let you modify .docx files without having any dependency on having Word installed.
I found this tutorial which I think is doing almost exactly what you are wanting do do using the Open XML SDK.
Many things to say, but I think I found my answers
The main question was if I add the reference to "Microsoft.Office.Interop.Word" and the client running the application does not have word, where will the application fail? My understanding now, is that it will not fail on launch if the client does not have word. It will, however, fail when the code that uses the "Office.Interop.Word" is reached.
The way to prevent this, is a simple registry check method. I used a variation of This method to check the registry. Then before any of my code that uses the "Office.Interop.Word" code is run, I check if the client has word in the registry. If they don't have word, I take the proper notification actions for my application. I also surrounded the "Office.Interop.Word" code in a "try catch" exception block as a double safe measure. In my code the exception would mean word is not installed. A variation of the code using "Office.Interop.Word" I used to update fields can be found here.
Novacode DocX can support Docm files if you change the code yourself. I did not want to, and didn't use a docm file. Docm files have security warnings associated to them when emailed. So an auto updating macro is out of the question.
-Octopus Emoji is Celebrating

Set Default Directory for Lotus Notes File Upload Control

I have a lotus notes web form in which computer-illiterate customers will use to attach Excel files and submit them to our company. I am using a Lotus Notes File Upload Control to allow them to do this, however, I need to default this File Upload Control to a certain directory location. I have already created a C# application the customers will be using, which places all of these excel files in a certain directory location, hence the reason I need to focus this File Upload Control. Unfortunately, some of the customers are computer challenged enough to not know how to navigate to these files on their own. Is this possible at all?
I'm assuming the users will be visiting a web page with the File Upload control, yes? If I'm misunderstanding please let me know and I'll delete this answer.
The simple answer is it isn't possible. The problem is that the browser can't know anything about the file structure of the clients that visit the site, so a "default path" property doesn't really make sense. It would likely only work in very specific environments (which is maybe true in your case, but not across the web in general)
I would investigate using the Notes API to have the C# program handle the upload without involving the browser client use of the file upload control. I don't know enough Java to be sure, but perhaps that might also be an option -- basically writing your own custom upload control that only asks the user for the filename.
You may also be seriously underestimating the ability of the users to follow directions. If your page identifies which directory the file will be found in, I expect most users will be able to follow the directions and upload from the correct directory.
So, I'm sure that accomplishing what you want to accomplish is possible in Notes, just not as simply as adding a default directory to the File Upload Control.

C# Google Docs. How to check if a user is currently editing the document?

For my project i need to sync a bunch of XLS files between a SQL server and Google docs (both ways).
When a user is editing a document, this document needs to be skipped and added to a queue. This is all not a problem, but i am unable to find anything about it in the documentation.
Does anyone know something more about this?
So any help is greatly appreciated :D
As of March 2016, Google has not provided any "current users" API.
A work-around based on using an Add-on's onOpen() trigger to note users who have opened a spreadsheet is discussed in the Google Docs Help Forum. That approach could be adopted for documents as well, with a suitable place to store information about who has opened the document. (In your case, a table on the SQL server may suffice.) You'd also need to devise a way to determine when a user is no longer editing - and there is no built-in "onClose()" trigger to help with that. (It's the cloud, so the whole idea of "open" is imprecise.)
Ultimately - I don't think it matters whether a user is currently editing a document. All their edits are being made on their own copy, which is being synchronized with a master copy. Your service would in turn be given its own copy, which you'd presumably snapshot for archival / synchronization with your SQL server.

Office Addin problem

I'm currently developing an add-in aimed to edit office documents stored in a codendi forge.
First problem was the read only flag on my file. A simple ‘save as’ solved that problem.
This solution was ok until I removed codendi’s cookie then instead of my file I received an error page.
What I want to do is to be able to catch an event triggered by office before it starts downloading the file. Then I can prompt the user for authentication and recreate a cookie by myself without the need for the user to open internet explorer and sign in.
Is there a way to catch an event indicating that word, excel and powerpoint are about to start a download?
Thanks in advance
I'm not sure I really understand what you want to do.
I don't think any office application actually downloads the wanted file, it is downloaded by your browser in a temporary file and therefrom opened by it.
I think that if you want to edit the file from you client, the best way would be to use the soap interface, which is part of Codendi. Have a look to
[yourforgehostname]/soap
[yourforgehostname]/soap/codendi.wsdl.php?wsdl
If you want to see the wsdl in a more readable form consider using
http://tomi.vanek.sk/index.php?page=wsdl-viewer
One of the supported API is login
Hope it helps

Categories