Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can pages in MS word 7 be sorted ?

Posted on 2011-03-02
20
Medium Priority
?
227 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
ID: 35021008
Do you have an example we can look at?
0
 

Author Comment

by:TIMFOX123
ID: 35021260
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
ID: 35021425
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35021433
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
ID: 35021619
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
ID: 35021642
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
ID: 35021676
I'm still working on it ... have you given up?
0
 

Author Comment

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

Author Comment

by:TIMFOX123
ID: 35027861
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
ID: 35028868
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
 

Author Comment

by:TIMFOX123
ID: 35030228
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
ID: 35030374
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
ID: 35031160
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
ID: 35031164
I just want to put in my own field

sneezy > down
bashfull > down

0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35031302
>>> 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
ID: 35061495
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
ID: 35066416
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 2000 total points
ID: 35066842
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
ID: 35073211
Chris
what a great job.

thx

timfox123 !!
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35073281
Glad it helped!

Chris
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

971 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