Welcome! Log In Create A New Profile

Advanced

Office Tool Bars

Posted by Rich 
Rich
Office Tool Bars
March 26, 2008 05:43PM
I am developing an app that is a document repository. Users can add any document to the database and then open it with a single click.

It would be nice if I could add an icon to Word, Excel, Outlook, etc. to automatically add a document to my app.

Any ideas?
KenKnight
Re: Office Tool Bars
March 27, 2008 04:56AM
Hi Rich,

I didn't see where you were doing this app in WinDev or WebDev, however, a couple of options, both of which would require you to do some coding in vbscript.

1) if Windev, write a script that passes the path and filename on the command line to your app. Your app then starts checking the command line parameter and if found processes the file and then exits. In this case, you wouldn't have to show anything, however, I'd probably recommend a simple window that shows a progress bar and then goes away.

2) if WebDev, either use a HTTP POST, SOAP or ftp to get the document up to the server. Once there process accordingly. If you're using an ftp server, you have a program running on the server that watches a specific directory(ies) and processes new files that are uploaded.

So both these options are writing a script and then installing that script in Word / Excel as a button.

Hope this helps.

Cheers!
Ken
Rich
Re: Office Tool Bars
March 27, 2008 02:34PM
Ken,

I am using WinDef and I don't mind coding, in fact I rather enjoy it smiling smiley

You have told me how to get a document into my app, but I still don't know how to add a butotn to the Office toolbars.sad smiley

Any suggestions?
Rich
Re: Office Tool Bars
March 27, 2008 02:36PM
That should be WinDev, not WinDef !
KenKnight
Re: Office Tool Bars
March 27, 2008 04:09PM
what version of office?

Essentially you are going to put your script in a macro and assign that macro as a button on your toolbar. Different versions of office have different methods of getting the buttons on the toolbar.

Cheers!
ken

PS. I just put on on the Quick Access Toolbar in 2007 word... so it is now available to all documents.
Rich
Re: Office Tool Bars
March 27, 2008 04:47PM
Ken,

I guess I didn't explain well enough.

I need to add a button to the toolbars programatically when my app is installed.

This is what I don't know how to do.
KenKnight
Re: Office Tool Bars
March 27, 2008 07:00PM
You'll probably have to write a COM add-in. That you can add pro progammatically. While it may be possible to do otherwise, I'm not aware of it.

Do a search on google for Excel COM add-in.

Cheers!
Ken
Rich
Re: Office Tool Bars
March 27, 2008 08:15PM
Ken,

Ok, I will look into it.

Ben
Re: Office Tool Bars
March 27, 2008 11:34PM
Hi,

The functionality you're looking for is an Add-IN.

Have a peek at the VBS at [support.microsoft.com]

Also have a peek at [www.jkp-ads.com] on how to add Addins using setup factory. This article will give you an overview on where Excel look for the Addins (eg. the registry and folder locations)

Hope this helps
Rich
Re: Office Tool Bars
March 27, 2008 11:40PM
Ben,

I will look into these suggestions.
H.Bach
Re: Office Tool Bars
March 28, 2008 12:11PM
Hi Rich..
i've done this actually last week (not for a Windev but for a Magic application).
I used VS.NET 2008 and VSTO (Visual Studio Tools for Office) and C# doing this.
After looking at these tools i would never use an other combination to do such stuff.
For example an Outlook integration that shows our Customer Data from a Magic app inside of outlook, generate a new Mail for this new customer and write the mail header and body in a SQL server DB related to this customer costs me round about 200 lines of C# code.
I've done some tests some weeks ago with the same related problem that you have.
Creating a new button in Word (Word 2007) and saving this document in a SQL Server DB... -> round about 120 lines of code. Very easy to do with VS.NET 2008.

Greetings
Henning
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: