I have successfully been able to run my own .Net code by following the steps posted here Execute .NET 3.0 code from Office 2003
Is there a way to use the standard .N
You should be able to use ComVisible .NET classes in this way. However the GenerateKey and GenerateIV methods don't have a return value. Try:
Sub Macro1()
Dim aesImplementation As New RijndaelManaged
aesImplementation.GenerateKey
Key = aesImplementation.Key
aesImplementation.GenerateIV
IV = aesImplementation.IV
End Sub
or better, not least because when debugging you can see whether an error occurs during construction or when you call the method:
Sub Macro1()
Dim aesImplementation As RijndaelManaged
Set aesImplementation = New RijndaelManaged
aesImplementation.GenerateKey
Key = aesImplementation.Key
aesImplementation.GenerateIV
IV = aesImplementation.IV
End Sub