
Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks I look forward to your reply. I found very little code examples in
how to work with this in .net. I found plenty in vba but that is of no use
in .net. by the way, I'm working in vb.net 2.0.

Signature
moondaddy@noemail.noemail
> Hi,
>
[quoted text clipped - 12 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
"Peter Huang" [MSFT] - 03 Aug 2006 08:04 GMT
Hi,
Based on my test, this works at my side, you may have a try.
VB.NET 2005 Console App, Word 2003
Imports Word = Microsoft.Office.Interop.Word
Module Module1
Sub Main()
Dim wdApp As New Word.Application
wdApp.Visible = True
wdApp.Documents.Open("C:\test\test.doc")
Dim SynInfo As Word.SynonymInfo
SynInfo = wdApp.ActiveDocument.Content.Words(1).SynonymInfo
Dim mCnt As Integer
mCnt = SynInfo.MeaningCount
MsgBox(mCnt)
Dim Slist As Object = SynInfo.SynonymList(mCnt)
For i As Integer = 1 To UBound(Slist)
MsgBox(Slist(i))
Next i
End Sub
End Module
Best regards,
Peter Huang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
moondaddy - 04 Aug 2006 00:01 GMT
Thanks. This doesnt compile. I always use option strict.

Signature
moondaddy@noemail.noemail
> Hi,
>
[quoted text clipped - 31 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
"Peter Huang" [MSFT] - 04 Aug 2006 06:08 GMT
Hi,
Thanks for your response.
Due to the complex of Word Object Modal, it seems to be complex to write
the code with Option Strict On.
Anyway, here goes the code, you may have a try.
Option Strict On
Imports Word = Microsoft.Office.Interop.Word
Module Module1
Sub Main()
Dim wdApp As New Word.Application
wdApp.Visible = True
wdApp.Documents.Open("C:\test\test.doc")
Dim SynInfo As Word.SynonymInfo
SynInfo = wdApp.ActiveDocument.Content.Words(1).SynonymInfo
Dim mCnt As Integer
mCnt = SynInfo.MeaningCount
MsgBox(mCnt)
Dim Slist As Array = CType(SynInfo.SynonymList(mCnt), Array)
For i As Integer = 1 To UBound(Slist)
MsgBox(Slist.GetValue(i).ToString())
Next i
End Sub
End Module
Best regards,
Peter Huang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.