VBA vs. VB.net

 Hi,

I'm trying to modify a Corel Drawing programatically using VB.net rather than VBA.  I don't seem to be able to do simple things such as FindShape.  I've added the CorelDRAW reference library but to no avail...  Here's an example of what I want to do:

Dim S as Shape
Dim TextToInsert As String

TextToInsert = “New Text”

Set S = ActiveLayer.Shapes.FindShape("SignatureEnglish") ‘should finds your objects named SignatureEnglish – this is case sensitive

If S Is Nothing Then GoTo Ending: ‘if it doesn’t find the shape, go to end
End if

 
If Not S Is Nothing And S.Type = cdrTextShape Then ‘if S is anything AND it’s a cdrTextShape object…
S.Text.Story = TextToInsert ‘inserts the text in your string variable…

End If

Ending:

Can someone help with this please?  Or tell me what's going on in VB.net vs. VBA?

Thanks!

Vibeke