Solved

Can pages in MS word 7 be sorted ?

Posted on 2011-03-02
20
217 Views
Last Modified: 2012-06-21
create a page with hostnames.  

I put manual page breaks between host names so it is one system per host name.

Now when I get  them done  half of them are status: waiting on approval

Can I do anyting to sort the ones that I can fix and put them at the top, the others would go at the bottom ?

I know this is a job for excel  

I realy do get a page of notes on each machine.  

I can not use excel for this because our machines are locked down to show all pages in excell on top of each other.  trying to compare 2 sheets is a pain!!!



0
Comment
Question by:TIMFOX123
  • 11
  • 9
20 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Do you have an example we can look at?
0
 

Author Comment

by:TIMFOX123
Comment Utility
one page for server named bart
results of ps -ef
Manual page break inserted into MS word

 one page for server lisa
results of ps -ef
Manual page break inserted into MS word



one page for server Homer
results of ps -ef
Manual page break inserted into MS word


0
 

Author Comment

by:TIMFOX123
Comment Utility
Is there a way I can use document map to do this ?

I just want to get my hands on the servers I still need to fix easly.

0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Without a representative file can you indicate if there is any font or layout information you want to maintain?

Chris
0
 

Author Comment

by:TIMFOX123
Comment Utility
Actually I have something that works for me.

I can put headings <H1> on all the pages that I can fix and then "view document map "

this sorts out what I can fix :)  
0
 

Author Comment

by:TIMFOX123
Comment Utility
I really could not post my sheet.  I work in a secure environment.   Sorry.  

thank you for trying however I did not give you enough :(  
0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
I'm still working on it ... have you given up?
0
 

Author Comment

by:TIMFOX123
Comment Utility
I still want a better solution, chris I am going to try to reopen this !!  thank you !!!!
0
 

Author Comment

by:TIMFOX123
Comment Utility
I use this all the time, that is why I want to find the stuff I can fix in a series of pages of stuff I can not fix  !!!  thx Chris
0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Apart from seperating by status I assume there is no order of the servers needed in the output and if so what/how is the server status recorded on each page and which 'entries' go at the top and which at the bottom?

Chris
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:TIMFOX123
Comment Utility
I just need to seperate "the wheat from the chaff"

The good from the bad.

thank you for working this so hard.  really
0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Not helping ;o)  Take for example the 'sample' you posted:


one page for server named bart
results of ps -ef
Manual page break inserted into MS word

 one page for server lisa
results of ps -ef
Manual page break inserted into MS word



one page for server Homer
results of ps -ef
Manual page break inserted into MS word

How do I know which is good and which bad ... are there key phrases in the page which denote the classification?

Chris
0
 

Author Comment

by:TIMFOX123
Comment Utility
Chris;

OK, lets say we have 7 servers named after the 7 dwarfs

Sneezy is broken due to a virus.
Bashfull will not respond to a ping.

I want to be able to seperate the servers I can fit from the other 5 which are running fine.

Dave
0
 

Author Comment

by:TIMFOX123
Comment Utility
I just want to put in my own field

sneezy > down
bashfull > down

0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
>>> sneezy > down
>>> bashfull > down

Now we're getting somewhere.  There will be a line for each server that says up/down or somesuch.  If the format is fixed and ideally the line then it will be possible to evaluate the status without too much difficulty.

Would you lke to settle on a format for example as stated already:

Sneezy > UP
bashfull > Down

And that the structure will be in effect unique to each record?

Chris
0
 

Author Comment

by:TIMFOX123
Comment Utility
Chris

as you have it is just fine with me.

It is just someting for me so I can wade though all the data I have.  

0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Each time there is a break in the flow the question goes out of my mind ... so it'll be a few hours till I refresh myself on where I got to but if I do not post in the next 24 hours by all means give me a nudge.

Chris
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
Comment Utility
OKay, I found the work document so:

The following code takes a document as:

one page for server named bart
Bart > DOWn
results of ps –ef

==================

one page for server named Bartholomew
Bartholomew > up
results of ps -ef
===================
one page for server lisa
LISA > DoWn
results of ps -ef

And reorganises as down at the top and up at the bottom.  Note I delivberately confused the sense of up/down to work irrespective of case.  The key string for the decision is the string:

" > DOWN"

If found then the page moves to the top and all others are placed at the end.

Chris
Sub reorder()
Dim arr() As String
Dim arrTop() As String
Dim arrBottom() As String
Dim pg As Integer
Dim intArrayIndex As Integer
Dim intArrayIndexTop As Integer
Dim intArrayIndexBottom As Integer

    arr = Split(ThisDocument.Range, Chr(12))
    ThisDocument.Range.Delete
    For Each itm In arr
        If InStr(1, itm, " > DOWN", vbTextCompare) Then
            ReDim Preserve arrTop(intArrayIndexTop)
            arrTop(intArrayIndexTop) = itm
            intArrayIndexTop = intArrayIndexTop + 1
        Else
            ReDim Preserve arrBottom(intArrayIndexBottom)
            arrBottom(intArrayIndexBottom) = itm
            intArrayIndexBottom = intArrayIndexBottom + 1
        End If
        intarryindex = intArrayIndex + 1
    Next
    For pg = 1 To UBound(arrTop) + 1
        ThisDocument.Range.Collapse wdCollapseEnd
        Selection.TypeText arrTop(pg - 1) & Chr(12)
        Selection.GoTo What:=wdGoToPage, Which:=lNextPage
    Next
    ThisDocument.Range.Collapse wdCollapseEnd
'    Selection.TypeBackspace
    For pg = 1 To UBound(arrBottom) + 1
        ThisDocument.Range.Collapse wdCollapseEnd
        Selection.TypeText arrBottom(pg - 1) & Chr(12)
        Selection.GoTo What:=wdGoToPage, Which:=lNextPage
    Next
    ThisDocument.Range.Collapse wdCollapseEnd
    Selection.TypeBackspace
    
End Sub

Open in new window

0
 

Author Closing Comment

by:TIMFOX123
Comment Utility
Chris
what a great job.

thx

timfox123 !!
0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Glad it helped!

Chris
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now