Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
Formatting several paragraphs
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Raphael Goubet, post: 5813989"] Hi, In a macro I'm writing, I have a loop on each run of which I add some paragraphs (one or more), contained in a string variable. Now, I'd like these paragraphs to get a LeftIndent formatting. The trouble is, I don't know how many paragraphs I'm inserting on each run of the loop. So, if I write: ActiveDocument.Paragraphs.Add.Range = MyText & vbCrLf ActiveDocument.Paragraphs(ActiveDocument.Paragraphs.Count - 1).Format = CommentPara were CommentPara is a ParagraphFormat object whose LeftIndent property is set as needed, only the last paragraph of the MyText Range is formatted. So, my question is: who can I apply CommentPara to all the paragraphs inserted and contained in MyText? I tried to define MyText as a Range object, format it and then insert it with the method Add, but it didn't work. Thanks in advance for your help. Raphael [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
Formatting several paragraphs
Top