How do I save preferences for my VSTO plugin? - c#

I've written a VSTO plugin for MS Project 2007 which basically just publishes Project data to our Sharepoint portal. To do this, the user has to enter in the sharepoint site name into our plugin everytime that they want to publish.
How do I persist this information so that the user only has to enter the information once? Ideally, I'd like to save it as part of the Project file so that it's portable from user to user. If that's not possible, I'll settle for it just persisting on a single user's machine.
The best solution I have so far, is to just store a mapping of Project filenames to Sharepoint sites in the User's temp directory, but that just doesn't seem like the cleanest way to do things.

Maybe you could store it using IsolatedStorage:
http://msdn.microsoft.com/en-us/library/3ak841sy.aspx

Related

How to embed Google Docs or Office 365 editor?

I've already checked some questions here on SO but couldn't find much help...
This one, for instance, is from 2011:
Embed Google docs editor into webpage?
My users need to be able to edit their Word documents on my website, just like Google docs editor and Office 365. Since I couldn't find information on how to easily integrate those, my current attempt was to convert the Word document to HTML (using OpenXmlPowerTools.HtmlConverter.ConvertToHtml) show it in a HTML editor and after the user edited the content save it back to the file (using NotesFor.HtmlToOpenXml).
Is this going to work? Is there any way to integrate either Google Docs or Office 365 to my website, allowing user to edit their content right there? If not, is it possible to programmatically create a document, send it to Google Docs/Office 365 have the user edit it there and then get the document back to save locally again?
Box and Dropbox have done it:
https://blogs.dropbox.com/dropbox/2015/04/dropbox-and-office-online/
https://www.box.com/blog/introducing-box-for-office-online/
Thanks!
The only thing i've been working with is Office365, so my answer is based on that, but i think you would be able to do the same in Google Apps.
Right now it's not possible to embed a document from Office365 in your own website for editing, only for viewing, but i guess this might change at some point.
But what you could do is to create a document, upload it do OneDrive, get a link to that file and make a button to open it in Office Online, after the edit is done, then the file would be on the users OneDrive.
If you would like to get the file to your system, it's just a matter of getting access to the users OneDrive.
Most of the operations can be achieved with the Graph API, http://graph.microsoft.io/, and all of it can be done without the user having to do anything. You just need to get the right permissions for the app that gets acess to Office365.

Excel Addin and ASP.net

I want to add functionality with my our website, when you request to change a set of date (Shown in Gridview). that when you click "Edit" that it would open up in Excel.
When that is completed and the user made changes he/she should click on a addin that would post it back to the website and update in the database.
(For example the Team Foundation Server, you can request to open the tasks in Excel and when it saves it would update TFS)
Would this be possible and can anyone redirect me to some examples to do this
Kind Regards:)
TFS achieves this with a plugin that in installed on the computer running excel and handles the update and integration.
The support for Sharepoint is also built into Office OOB.
You would need you would need to create your own plugin for excel and distribute it to your users.

Web service to interact with sharepoint

I am in need of some assistance on a current project. I'm working on a windows service that downloads specific sharepoint files and converts them to a pdf, then emails them to multiple recipients.
The server doesnt have access to the sharepoint library so Microsoft.Sharepoint assembly reference wont work is there another way to access the files and download them? once I get the file (probably word docs) I need to convert them to pdf.
SharePoint supports WebDAV and that can be used to get individual files provided you know where they are already. However a word of caution, this does require that the domain user that use to get the file must have the "File Browse" permission I believe.
I am assuming you cannot deploy anything to the Sharepoint server
SSRS ReportViewer which is part is Sharepoint can be used to batch create PDF's as it has an export option, You will find them also as part of Visual studio 2010
http://forums.asp.net/t/1556522.aspx/1
Is an example of this.
Then use the web requests to fetch the file.

which sharepoint project should be created in VS2010?

I want to get some useful data from *.csv file through the retrieve query, then put these data in the reference column of the sharepoint list using the admin account.
Which sharepoint project in VS2010 should I choose? And what should I do in next?
Thanks
如果我是要从 *.csv 文件中取一些数据 ,然后放到sharepoint上, 应该选择哪种工程呢?然后接下来应该怎么做呢?
谢谢
If you only need to run this job once you could create a console application and let it run on the server. Include a reference to the Microsoft.SharePoint.dll to be able to use the Object Model of SharePoint. See http://msdn.microsoft.com/en-us/library/ms473633.aspx for an overview of the different objects you can use. (SharePoint 2010)
If you have no access to the server you could try the same using the webservices that sharepoint exposes. See http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx for a list of the webservices in WSS3.0
But if you need it be done regularly your better of creating a webpart or a custom service to include into SharePoint. See http://msdn.microsoft.com/en-US/sharepoint/ee513148.aspx for an intro on building a WebPart for SP2010.
Google around, there is a lot to find about interaction with sharepoint through its object model.

Open/handle Word documents like SharePoint

Could anyone point me in the right direction when it comes to handling Word documents (.docx) on the server using asp.net.
I know I can write to and read the .docx document using the API provided.
But I would like to implement this like SharePoint does it. The user browses the web site, he is logged in, then chooses to make a new Word document in a folder, then the Word document downloads and opens locally. Then I would like the user to be able to save the document back to the server.
Alternatively, is there any good components for reading/writing Word documents in the browser. I have tried using the Telerik editor component without any luck.
First: About Sharepoint & Word: Sharepoint is using a protocol called WebDAV to provide this.
Afaik is WebDAV a standard protocol included with IIS (Install Windows Components). Windows can talk with WebDAV like it's some mounted drive, and therefore Word can handle .doc files that are served from there. To communicate with the WebDAV instance from ASP.NET you can use http://www.independentsoft.de/webdav/index.html.
I guess redirecting the user to the Word doc on the WebDAV server should get it working for the user, but I'm not sure about that. Never actually implemented a WebDAV solution.
Good editor: If you have a small set of users, you should have a look at xstandard, I found that by far the coolest rich text editor available. Yet it works with Java/ActiveX, so your users should install the component at first, but it supports image drag-drop etc. I have never seen a native in-browser editor that gives me a good experience (Telerik came closest 2 years ago).
You can integrate with the Zoho writer api http://writer.zoho.com/home?serviceurl=/index.do

Categories

Resources