Writing an MS Word Addin in C#

A

Andrew Mercer

HI,

I have written a standalone windows application part of whose job is to upload
edited Word documents to a Web Server.

It prompts the user to upload when the ~$.....doc file disappears from the
directory
it is watching. (The document is uploaded via a WebService).

Having read some articles about add-ins I would like to try and move this on
so that the prompt to upload appears from within Word itself (possibly at the
point of closing the document).

Is this possible with a MSWord add-in? Note: The code to do the uploading to
the server would also need to be in the add-in.

Can the user be prompted when the document is closed or at least from a new
button?

Or can my standalone application be called from the add-in instead to do the
uploading?

Any advice, useful examples or documentation would be much appreciated.

Thanks in advance.
 
P

pavan

Hi Andrew,
Can the user be prompted when the document is closed or at least from a new
button? Yes!

Or can my standalone application be called from the add-in instead to do the
uploading? Yes!

Is this possible with a MSWord add-in? Note: The code to do the uploading to
the server would also need to be in the add-in.
I really don't understand the need for this. Pls note, if you are not
already aware, that an add-in runs only when Word is running. So I
don't think it can replace your web service logic.

Pls let me know if I've understood your problem incorrectly.
Hope this helps
Regards,
Pavan
 
A

Andrew Mercer

Hi,

Thanks - however I need to clarify what my code does/needs to do.
--
Andrew Mercer
-----------------


pavan said:
Hi Andrew,
Yes!

Does yes mean that the user can be prompted when doing any of the following:
(i) Clicks a new button in Word, (ii) Closes Word using either File -> Close
or File -> Exit or (iii) Closes Word via the [x]. It would be nice to cater
for all of these options.

Are you saying I can actually call code in my standalone application from
code within the new Add-in.
I really don't understand the need for this. Pls note, if you are not
already aware, that an add-in runs only when Word is running. So I
don't think it can replace your web service logic.

Pls let me know if I've understood your problem incorrectly.

What I mean here is that there is currently code within my standalone
application that makes a call to a WebService on the WebServer to upload the
ammended Word document. If I can call this code from within my Add-in then
that should be fine. Therefore the actions I hope for are:

1. User uses one of the options listed above to close word.
2. The user is asked if they wish to upload the file to the server.
3. If the user chooses to upload the ammended file then the new Add-in
makes a call to my current standalone code which then does the uploading.

If the above scenario works as required then that is fine. My comment about
the
'uploading code needing to be in the Add-in' would only be relevant if the
Add-in
was unable to call the standalone code direct. Therefore the actions would
therefore be as follows:

1. User uses one of the options listed above to close word.
2. The user is asked if they wish to upload the file to the server.
3. If the user chooses to upload the ammended file then the new Add-in
makes the call to the WebService to upload the ammended document.
Hope this helps
Regards,
Pavan

Can you recpmmend websites/examples for Add-ins - it is totally new to me
so am trying to read as much as possible to assist me.

Thanks again
Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top