saving to different location

Add-in Express™ Support Service
That's what is more important than anything else

saving to different location
plugin to save to diff location 
Thomas Thomas




Posts: 17
Joined: 2006-09-12
Hi all,

I am trying to develop a plugin that works with excel,word,outlook etc where u will have buttons to save the file to different location.

I am using VS 2005, addin express .net with c# . I am newbie with microsoft applications.

couple of things I am trying to understand here.

Will one plugin work with all the application. I was wondering of something like hostapplication.getCurrentFile()..

or for a start how will I be able to access the current file from with in the button click event.

eg
private void adxCommandBarButton1_Click(object sender)
{

System.Windows.Forms.MessageBox.Show("Saving to Docsbox");
System.Windows.Forms.MessageBox.Show(sender.ToString());
}



finally how I make the executable of my plugins

any insight on how to proceed..

Thanks
Thomas
Posted 12 Sep, 2006 00:58:41 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Thomas.

You can develop one add-in for several applications.
To detect what application loads the add-in you can use the HostType property of the addinmodule. To access the current document/file you need to manipulate the Object Model of the host application. Please use the Object Browser in VS 2005 and 'Microsoft Visual Basic Help' embedded in Office applications to learn more about all properties and methods of the host application.
To install the add-in you can use the automatically generated setup project in VS 2005.
Posted 12 Sep, 2006 07:17:49 Top
Thomas Thomas




Posts: 17
Joined: 2006-09-12
Hi Sergey,

Thanks I made some good progress,
>To access the current document/file you need to manipulate the Object >Model of the host application.
I got this right , now i need pop up a panel on the button click where user can enter some data before they save to a location, something like a form where the user can enter/select some data before saving.

Will it be creating a form seperately and adding the source of the form to plug in project .
I tried that, seems like c# is not storing all the form source contents (labels ,text controls etc..) in a single file.. there is partial class thing which is very new to me.. It seems to me like the code is all over the place..

let me know if I am proceeding in the right direction..


Thanks for all help
Thomas
Posted 13 Sep, 2006 00:53:45 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Thomas.

In the Form designer of Visual Studio 2005 all properties are stored in the <the form name>.Designer.cs file. You just need to click on the 'plus' the left of the <the form name>.cs file in the Solution Explorer window.
Posted 13 Sep, 2006 08:40:58 Top
Thomas Thomas




Posts: 17
Joined: 2006-09-12
Thanks Sergey,

it all working out fine. But I do have one query ,on the form I prompt for user to save I need to pre-poplate with data from a remote server which has SOAP API's . it seems to me like c# soap examples /documentation to be fairly limited. But if u can pass any info regarding usage of c# with SOAP or point me where I can get more info on this that will be great.

I was using python before this and they do have some nice libraries which takes care of the underlying details..

I installed "SOAP Toolkit 3.0" without much luck in getting it work with the server..

the code below will get me going in python
from SOAPpy import SOAPProxy
serverURL='http://xxxxxx/SOAPInterface/'
server = SOAPProxy(proxy=serverURL,namespace=serverURL,soapaction=serverURL+'#Login')
results = server.Login("xxx@xxxxx.com","xxxx")
print results

Any suggestions is appreciated.

Thanks
Thomas
Posted 14 Sep, 2006 01:27:00 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Thomas.

I know a good resource devoted to C# programming.
Please visit the following page: http://www.codeproject.com/soap/
Posted 14 Sep, 2006 08:07:01 Top