Im trying to use the ComAutomationFactory class in VB .NET the example im working from is c# and is working fine but my project doesnt compile and says this class is not defined??
also what is the return type? in the c# example it returns a type of dynamic but this type does not exist in vb .NET?
Possibly you're sample is old, according to this blog:
http://silverlight-essentials.blogspot.com/2010/03/breaking-changes-in-com-interop-between.html
It's changed name as:
The class ComAutomationFactory
has been renamed to AutomationFactory
.
Additionally you have to reference System.Runtime.InteropServices.Automation
for this class.
Regarding the return type, the answer to this question has a solution:
Iterating over Word Document Fields using ComAutomationFactory in Silverlight 4