-
October 29th, 2012, 06:59 AM
#1
bug using interop to change style
Hi, I don't know if this is the place correct. I explain my problem:
I have a document with three paragraphs and various styles:
STYLES
estilo1:
FontName = Arial
Size = 12
estiloN:
....
PARAGRAPHS
1 Paragraph: STYLE (estilo1 + Times New Roman + size 10)
2 paragraph: STYLE (estilo1)
3 paragraph STYLE (Normal - default style of documents)
My selection is located in position 0 of document (1 character of 1 paragraph), then execute this code:
Dim estiloActual as Style = Me.InternalDocument.Styles("estilo1")
with estiloActual
.AutomaticallyUpdate = false
.BaseStyle = "Normal"
.NextParagraphStyle = "estilo1"
end with
This code causes a change in style in 1 paragraph. Change of "estilo1 + Times New Roman + size 10" to "estilo1".
The objective of the code from Word and pretend it does not change the results in the same outcome.
I made the same changes I intend to do in word, recording a macro and is exactly the same code I try to run, but there is no way,
for programming, do not change the paragraph style of the current selection.
Anybody can help me?
Thanks for advance.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|