-1

I can set a style for a table in Word VSTO with:

Me.Application.ActiveDocument.Tables.Item(1).Style = "Table Grid 8"

How can I get the selected table style?

0

2 Answers 2

0

In VB.Net you need:

Dim style as Microsoft.Office.Interop.Word.Style    
style = Globals.ThisAddIn.Application.ActiveDocument.Tables(1).Style

The only difference with C# is the square bracket

0
0

In C#, I can get the style this way

Globals.ThisDocument.Tables[1].get_Style();
1
  • hi. I've written my program in vba language and then turned it into VB. Vba language program was working well, but in the language of vb does not work properly and could not get a table style. I work in the VB language and this method is not in it. Thanks Aug 22, 2015 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.