Sunday, March 25, 2012
Access Class Library from Excel 97
library from Excel 97 ? I've tried but receive a runtime error
-2146232576 which means nothing to me, my class is shown below, I've
placed the assembly into the GAC and registered it using RegAsm all to
no avail
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
namespace CallingCSharpFromWord97
{
[ComVisible(true)]
public class PJKWordClass
{
public TextWriter tw = null;
public PJKWordClass()
{
}
public void WriteLogFile(string msg)
{
tw = new StreamWriter("c:\\PJKCalledFromWord97.log", true);
tw.WriteLine(String.Format("This file was created by C# which was
called from a COM client {0} at
{1}",msg,DateTime.Now.ToLongDateString()));
tw.Close();
}
}
}
I can reference the assembly in Excel, but when run, it bombs on the
CreateObject line ( with the error number shown above )
Dim oCSharp As CallingCSharpFromWord97.PJKWordClass
Set oCSharp = CreateObject("CallingCSharpFromWord97.PJKWordClass")
regardsPete Kane wrote:
> Hi All, does anyone know if it's possible to utilise a .NET class
> library from Excel 97 ? I've tried but receive a runtime error
> -2146232576 which means nothing to me, my class is shown below, I've
> placed the assembly into the GAC and registered it using RegAsm all to
> no avail
> using System;
> using System.Collections.Generic;
> using System.Text;
> using System.IO;
> using System.Runtime.InteropServices;
> namespace CallingCSharpFromWord97
> {
> [ComVisible(true)]
> public class PJKWordClass
> {
> public TextWriter tw = null;
> public PJKWordClass()
> {
> }
> public void WriteLogFile(string msg)
> {
> tw = new StreamWriter("c:\\PJKCalledFromWord97.log", true);
> tw.WriteLine(String.Format("This file was created by C# which was
> called from a COM client {0} at
> {1}",msg,DateTime.Now.ToLongDateString()));
> tw.Close();
> }
> }
> }
>
> I can reference the assembly in Excel, but when run, it bombs on the
> CreateObject line ( with the error number shown above )
> Dim oCSharp As CallingCSharpFromWord97.PJKWordClass
> Set oCSharp = CreateObject("CallingCSharpFromWord97.PJKWordClass")
> regards
>
Sorry posted to wrong group :-)sql
Saturday, February 11, 2012
about delivery channels
Which deleverychannels does NS support?
Can i use smartphone to receive notification?
If can,have any samples for this? Thanks
Out of the box, SSNS supports 2 delivery channels - SMTP and file. But it's easily extensible so you can use the API to create your own delivery channel to send notifications to an SMS device, a fax server, voicemail, whatever you can programmatically address.
BOL is a good place to start, but Shyam Pather's book has a better example of how to do this.
HTH...
Joe
|||
I have reading Shyam Pather's book of sql server 2005 .but I have not its example. who can give the example,special customer deliver channel . my e-mail: sichuanwww@.163.com. thank you very much.
|||In have Shyam's 2000 book, he describes how to create a custom delivery protocol in Chapter 10. I don't have his new book in front of me at the moment but I feel sure it's in there too.I don't have a custom delivery protocol that I can share at the moment. I'll see if I can create a simple one and post it on my blog - http://www.sqlns.com. It'll be a couple of weeks before I can get to it though.
HTH...
Joe
about delivery channels
Which deleverychannels does NS support?
Can i use smartphone to receive notification?
If can,have any samples for this? Thanks
Out of the box, SSNS supports 2 delivery channels - SMTP and file. But it's easily extensible so you can use the API to create your own delivery channel to send notifications to an SMS device, a fax server, voicemail, whatever you can programmatically address.
BOL is a good place to start, but Shyam Pather's book has a better example of how to do this.
HTH...
Joe
|||
I have reading Shyam Pather's book of sql server 2005 .but I have not its example. who can give the example,special customer deliver channel . my e-mail: sichuanwww@.163.com. thank you very much.
|||In have Shyam's 2000 book, he describes how to create a custom delivery protocol in Chapter 10. I don't have his new book in front of me at the moment but I feel sure it's in there too.I don't have a custom delivery protocol that I can share at the moment. I'll see if I can create a simple one and post it on my blog - http://www.sqlns.com. It'll be a couple of weeks before I can get to it though.
HTH...
Joe