Using the .NET Bridge to access MS Office applications

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using the .NET Bridge to access MS Office applications

FredVdd
 
Hi,
 
Can anyone share a sample of how to use the .NET bridge to interact with MS Office applications?
 
I've got the basics working as described on
 
But as an inexperienced COM developer, I fail to advance much.
 
Any and all suggestions much appreciated.
 


--
Kind regards / Met vriendelijke groeten,

Frederik Vandendriessche


http://ooos.redirectme.net/FrederikAGVandendriessche


Reply | Threaded
Open this post in threaded view
|

Re: Using the .NET Bridge to access MS Office applications

Frederik Vandendriessche

Fellow Squeakers,

This must be a difficult one ?
Opposed to previous questions put to the Squeak community/individuals, 
This one triggers very few replies. 
Having said this, I suspect a few hardcore squeakers are on holiday... :-/

Meanwhile, I have made some progress:

(after getting the Squeak.Net bridge basics working)

With the NET.SDK bin\TlbImp.exe, convert X:\Program Files\Microsoft Office\OFFICExx\MSWORD.OLB to MSWORD.DLL. (there are more .OLB files in that directory - for the other MS Office apss...)

copied MSWORD.DLL to my squeak dir, and then:

doc _ nil.
app _ nil.
dotNet := DotNet startNew.
dotNet Assembly loadFrom: 'Word.dll'.
app _ dotNet ApplicationClass new.

It does create a WINWORD.EXE process (according to the Windows task manager).

(it also hangs my squeak every so often - Semaphore>waitTimeoutMSecs:)

As to how to open an actual document,  extract the document properties, and convert the document to text or xml...   A few more hours needed...

Unless you have some hints for us?

 

 



Reply | Threaded
Open this post in threaded view
|

Re: Using the .NET Bridge to access MS Office applications

Jason Johnson-5
On 8/30/07, Frederik Vandendriessche <[hidden email]> wrote:

Fellow Squeakers,

This must be a difficult one ?
Opposed to previous questions put to the Squeak community/individuals, 
This one triggers very few replies. 
Having said this, I suspect a few hardcore squeakers are on holiday...  :-/



Well, personally I have so little time that I can either (a) do work or (b) answer email.  So I end up going sometimes weeks without even seeing my email.

I personally didn't plan on saying anything on this one because I know about 0 about this.  I know what .Net is and some theoretical things about it, but I have pretty much no experience doing anything with it.  Probably some of the folks on this list are in the same boat as me in one or both of these points.

But it does sound really cool that you're working on this.  Please don't take the low replies as a sign that no one's interested.  If you build it they might come. :)


Reply | Threaded
Open this post in threaded view
|

Re: Using the .NET Bridge to access MS Office applications

vaidasd
In reply to this post by Frederik Vandendriessche
Hello,

We used bridge to call functions of com sever dll from squeak. We
succeeded only when calling very  "simple" functions. We failed to get
non ASCII characters, decimals when decimal separator  in windows is
not dot. Bridge can operate in two modes: sockets or direct. Direct
mode IMO have problems with releasing windows resources. We saw
growth of used handles with every call in  Process Explorer from
Sysinternals. We had "hangings" when tried to call SOAP method that in
turn calls .Net method, but solved this problem.


 Vaidotas