Last post Aug 31, 2009 01:05 AM by dke01
Aug 30, 2009 09:01 PM|dke01|LINK
I am writing a C# 3.5 MVC web application, with MS Office and SQL 2008.
I need users to download a MS Word document from a web application, Edit it, then upload it back to the web applicaiton.
Instead of making the user log back into the web app find the correct document they are editing and upload it again. I would like it to work similar to how SharePoint 2007 works.
I.e The user checks out the document on the server, so others are locked out of it (I can do this using server side code easily)
I then want the user to press save which will automatically use HTTP post to send the Binary version of the MS word document to the server which will save it (again the server side code for this is easy)
My VBA Questions
1) How can I use VBA code in the word document to send the saved document back to the server? I have looked at the WebServices toolkit and can see XMLHTTP object, but I am not sure if this works with binary data or just XML. Each search web search on the topic
referes to older technology like SOAP Toolkit 3.0 and XMLHTTP3.0 what is the latest recommened way of doing this?
2) I would need some paramaters to pass back in with the POST to the serve such as the UserID and DocumentID. How can I achive this? Can I use .NET code some how during the download to embed this information in the file some how (Prefeibily not the
filename itself). So where the user cannot change it, In a hidden field? Meta data or VbA code? Can I edit VBA code using my Web App Server side code at run time?
p.s. I need a cross platform solution so writing dynamic FTP scripts is probably out of the question
I have also posted this question here
and in the getting started .net forum
Aug 31, 2009 12:14 AM|qwe123kids|LINK
Uplaoding(FTP) File using VBA..
Chk teh abovelink
Aug 31, 2009 01:05 AM|dke01|LINK
Thanks I have seen these post already, they both seem to create a .BAT file (WINDOWS ONLY) an execute it. I do not belive this option would work on Office for Apple Macs? (even though VBA does not work on Office 2008 for mac the new version of office will
Using FTP would also require the end users firewall is configured to allow FTP connections, I would much prefer a HTTP TCP/IP only solution if possible. This also had the advantage of proding a sucess, failure message back to the client.
Is there any other sugestions?