Visual basic donet and access to Word style

M

Maileen

Hi,

I developed an application with VB.NET.
this application should change Normal style and add 2 new styles DS SLA1 and
DS SLA2.

everything worked perfectly, till i got a problem when i tried to use :
wdApp = New Word.Application
wdDoc = wdApp.Documents.Add
with wdDoc.Styles("Normal").Font
..Name = "Arial"
.Size = 10
.Bold = 0
.Italic = 0
.Underline = WdUnderline.wdUnderlineNone
.UnderlineColor = WdColor.wdColorAutomatic
.StrikeThrough = 0
.DoubleStrikeThrough = 0
.Outline = 0
.Emboss = 0
.Shadow = 0
.Hidden = 0
.SmallCaps = 0
.AllCaps = 0
.Color = WdColor.wdColorAutomatic
.Engrave = 0
.Superscript = 0
.Subscript = 0
.Scaling = 100
.Kerning = 0
.Animation = Word.WdAnimation.wdAnimationNone
end with

application is telling me that it can not get access to :

word.styles.get_items(Object& Index)
where Object& Index is "Normal"
I'm surprise as it worked before...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top