2

I want to know if this is doable and get some hints about how to achieve this. I guess at least it would need a confirmation dialog to run the (possibly evil) macro.

I want to produce an OpenOffice document that will upload itself on save to a hardcoded URL.

Is it possible?

What are the rough steps to achieve this?

My guess is:

  • bind a macro to the save event
  • have that macro get the current file binary data
  • have it post this data to a URL

but before researching about how to do this I need to know if this can be done in the first place.

silviot
  • 4,615
  • 5
  • 38
  • 51
  • 1
    I do not see any issue why this should not work. Maybe it is better to create a second "special" save button, which triggers both the save and then the upload - but this is just a detail question. – s-m-e Dec 13 '12 at 21:07

1 Answers1

0

I don't believe you need a macro to do this, instead depending on your OS you can map a FTP or other type of protocol remotely.

For example in windows you can "Map" a FTP as a drive and this would do exactly the same thing as your describing, you open the file from the FTP and upon saving it will then be written to the remote server. FTP is just an example here, there are other platforms you can use.

If you are at all interested in this method then following the instructions below, otherwise disregard.

Mapping a Network Drive in Windows Vista and 7.

  1. Click on Windows start orb and then click on "computer".
  2. Click on map a network drive.
  3. Map a network drive will then open a new dialog box where you can click "connect to a website"
  4. Simply follow that easy to use wizard and click add a new network location (Choose a custom network location)
  5. Type in your FTP address, including username and password.
  6. Finally name your network location to whatever you want.

Just a suggestion, I really don't think you need any macro unless you plan on distributing these files to other people then yes, but they would need to install that macro/plugin on their open office since there is no way to encode the document itself with such features as far as I know.

Simon Hayter
  • 3,131
  • 27
  • 53
  • I know this route exists, but it's not one I'm not interested in: it requires me to configure each and every client. Your sentence "they would need to install that macro/plugin" is enlightening to me anyway. I'm a programmer but I don't know anything of the OpenOffice echosystem; I took for granted macros were embedded in documents. So what you tell me is that I could ask my users to install a macro and then give them files with embedded metadata about the endpoint where the file is to be uploaded. My initial goal is to be simple and cross-platform and this solution would still be both. – silviot Dec 15 '12 at 09:34
  • I don't think your be able to get a macro to do this since the program does support it. Macros are built on code that is support and doesnt add anything anything it can't do. – Simon Hayter Dec 16 '12 at 18:28
  • Furthermore in response of having to add the FTP/WEB folders to each seperate client, that depends on the network setup. If they login to a domain this process can be automated and no setup other than adding a BAT file to the login process on the server is required. Also it could be possible to make an install program which adds the FTP folder without the hassle of the 6 steps I made, for example a simple install script, one click method. Anyway, GL your Project :P – Simon Hayter Dec 16 '12 at 18:33