1

I have a word document, the data in the word needs to reach a server through a click of a button. The "Button" implies VBA.

I was wondering if it would be a nice idea to use SOAP for that. But someone suggested FTP (which I didn't really understand).

I also thought of using XML-RPC.

could someone please shed some light? cheers

Marci-man
  • 2,113
  • 3
  • 28
  • 76
  • 1
    How much data do you need to send when you click the button? Are we talking about a couple of values or about pages of data? – barrowc Oct 12 '11 at 05:50
  • no not a lot of data... it is just 10 to 15 values – Marci-man Oct 12 '11 at 08:57
  • 1
    Look at http://stackoverflow.com/questions/4158492/looking-for-code-to-get-gps-coordinates-from-address-vb-vb-net-vba-vbscript/4160081#4160081 That answer uses VBA to send a GET request to a server. You could adapt that to your purposes, perhaps – barrowc Oct 14 '11 at 07:53

1 Answers1

2

The transport mechanism really depends on the server interface, but since you are going through these options I assume you need to implement the server interface as well.

If you need to transfer the whole Word document as such, use File Transfer Protocol (FTP) or direct TCP socket-connection.

If you need the data from the Word document, you can serialize it in a machine-readable format, for example XML, and send it to the server using Hyper-Text Transfer Protocol (HTTP), for it's simplicity.

XML-RPC and SOAP might be too heavy and perhaps on the wrong abstraction level for your problem.

Oh, and for the client side: pick your client-side development tools after choosing your transport mechanism. Some languages and frameworks work better for different tasks than others.

supertopi
  • 3,469
  • 26
  • 38
  • 1
    so I assume it is easy to send data from VBA over HTTP. – Marci-man Oct 12 '11 at 00:50
  • 1
    Client Side has to be VBA since I need to get the data out of the Word Document (Not the entire document). The server is Java based, I know at least that part... so this would imply a Java program listening to port 80 (or perhaps 443 for HTTPS) ? – Marci-man Oct 12 '11 at 00:53
  • 1
    Both VB and Java are capable of forming,sending and receiving HTTP packets. Microsoft's System.Web contains an HttpRequest class and Java contains various classes for implementing an HTTP Server. – supertopi Oct 12 '11 at 09:21
  • what do you mean HTTP Server? Are we talking about connections at socket levels or something more higher? Can these HTTP servers in Java be used standalone or do i have to write a method around it? A keyword would be really nice! – Marci-man Oct 12 '11 at 09:48