Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Can pages in MS word 7 be sorted ?

Posted on 2011-03-02
20
Medium Priority
?
228 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
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is an article on how to answer questions, earn points and become an expert.
Currently, there is an issue with being able to copy values from an external application to a dropdown list in Project Web Access (PWA).  The standard copy and paste methods don't seem to work properly. Here is a way to accomplish this task to s…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

578 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