[mso] Re: Word Outlines
- From: Thomas Hutchins <hutch99999@xxxxxxxxx>
- To: mso@xxxxxxxxxxxxx
- Date: Wed, 19 Jul 2006 09:39:41 -0700 (PDT)
Christine,
I don't have a complete answer for you, but maybe a start...
Sub AAAAA()
Dim myParas As Paragraph, x As Long, y As Long
'Selection whole document
Selection.WholeStory
'Expand the outline completely. Expands one level each time.
For x = 1 To 10
ActiveWindow.ActivePane.View.ExpandOutline Range:=Selection.Range
x = x + 1
Next x
'Check every paragraph. Delete all the Level 1 (date) paragraphs.
For Each myParas In ActiveDocument.Paragraphs
If myParas.OutlineLevel = wdOutlineLevel1 Then
myParas.Range.Delete
End If
Next myParas
'Selection whole document
Selection.WholeStory
'Collapse the outline completely
For x = 1 To 10
ActiveWindow.ActivePane.View.CollapseOutline Range:=Selection.Range
x = x + 1
Next x
'Now there should be no Level 1 paragrpahs left, just collapsed Level 2
(project).
'Sort the paragraphs to put all the paragraphs for each project together.
' (haven't figured this part out yet)...
ActiveDocument.ActiveWindow.View.Type = wdOutlineView
End Sub
I next wanted to add a kind of ripple sort which would move all paragraphs for
each project together, then expand the outline and delete the redundant project
heading paragraphs. If I move the collapsed paragraphs manually it works great.
When I move them programatically, the sublevel data doesn't move. Also,
although in the Word window the collapsed Project paragraphs all show as level
2, if I cycle through them using VBA:
For x = 1 To ActiveDocument.Paragraphs.Count
MsgBox ActiveDocument.Paragraphs(x).OutlineLevel & " , " &
ActiveDocument.Paragraphs(x).Range
Next
The first paragraph shows level 2, and all the rest show level 3.
Hopefully Dian or Linda or some other Word guru can tell us how to select &
move the collapsed paragraphs. I'm basically an Excel & Access guy.
BTW, you posted an Access question a few months ago. Did you see my reply?
That question, I could answer.
Hope this helps,
Hutch
"McDonald, Christine, Ms, DCAA" <Christine.McDonald@xxxxxxxx> wrote:
Question about Outlines before I start researching how to do it, is it
even possible.
I keep track of what I do each day in a Word document. The document is
organized using styles, so that each project area is a heading, and I
record what I did in that area each day using a bullet style. I keep a
separate document for each month.
At the end of month, I need to summarize all this by project area,
rather than by date. I can get it into an outline format because of
using the styles, but is there a way to have Word reorganize it and (1)
delete the dates which are heading style 1 and then combine all the
bulleted information under each project, which are set up as a heading 2
style. Right now, I put it in Outline format, collapse all the outlines
and then move each one individually. Also, is there a way to collapse
the entire outline at once, rather than each level individually?
If this is feasible, I can look for information or if someone knows of
an writeups on it that would be great.
Thanks in advance.
Christine McDonald, CPA
Technical Specialist
Information Technology Division (RSA-4)
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the dropdown
menu at the top. This will allow you to unsubscribe your email address or
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with
instructions. Once you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
---------------------------------
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta.
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the dropdown
menu at the top. This will allow you to unsubscribe your email address or
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with
instructions. Once you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
- References:
- [mso] Word Outlines
- From: McDonald, Christine, Ms, DCAA
Other related posts:
- » [mso] Word Outlines
- » [mso] Re: Word Outlines
- [mso] Word Outlines
- From: McDonald, Christine, Ms, DCAA