View Single Post
  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default End of document paragraph symbol

Do I understand the professor correctly?

If you understand what the little demo has shown you and you are still
asking that question then I would have to say no. If there is one and only
one paragraph symbol at the end of your document or one and only one
paragraph symbol following your final character of text then you and your
professor should get along nicely with your assignment scores improving.

Good luck.


--
Greg Maxey

See my web site http://gregmaxey.mvps.org
for an eclectic collection of Word Tips.

"It is not the critic who counts, not the man who points out how the strong
man stumbles, or where the doer of deeds could have done them better. The
credit belongs to the man in the arena, whose face is marred by dust and
sweat and blood, who strives valiantly...who knows the great enthusiasms,
the great devotions, who spends himself in a worthy cause, who at the best
knows in the end the triumph of high achievement, and who at the worst, if
he fails, at least fails while daring greatly, so that his place shall never
be with those cold and timid souls who have never known neither victory nor
defeat." - TR


"TestThis4x4" wrote in message
...
Wow! I didn't realize it was so involved! I'm taking a course on computer
integration and my professor's noted in my homework assignment:

"There are to be no additional paragraph symbols at the end of the
document
even if the file that is downloaded has them. There are also to be no
additional blank pages at the end of the document. Do not use multiple
spaces
or tabs to align text. I suggest students have show on so they can see all
the hidden symbols (tabs, spaces, paragraphs, page breaks)."

So I got credit marked off my assignment because I had a paragraph symbol
at
the end of my document.

Do I understand the professor correctly?

"Greg Maxey" wrote:

On Sep 21, 3:33 pm, TestThis4x4
wrote:
How do you remove just the LAST paragraph symbol in a document? All the
others can stay but the last one needs to be removed.


I don't think the correct answer is "you can't". It is more like, if
you do then the last paragraph container just recreates itself. Mr.
Daniels is correct. The last paragraph container stores much of the
formatting information about the document.

The following example macros should illustrate.

Open a new blank document (lets call it demo doc) and type ten
paragarphs as shown below. Use the page setup dialog to change the
default margins to say (.5, .5, .5 and .5)

1
2
3
4
5
6
7
8
9
10

Carefully select and copy everything but the last paragraph mark.
Open a new document and paste the contents. The new document page
setup (margins) should be unchanged. Close the new document.

Carefully select and copy everything in demo doc including the last
paragraph mark. Open a new document and paste the contents. The new
document page setup (margins) should change to match those set in demo
doc. This is because that last paragraph mark stores page setup
information about a document.

Now with demo doc select and delete the last paragraph or run the
following code:

Sub Demo()
ActiveDocument.Paragraphs.Last.Range.Delete
End Sub

The result is:

1
2
3
4
5
6
7
8
9

The last paragraph was deleted (no code error) but the page setup
doesn't change. You can extend this demo with the following code:

Sub ScratchMacro()
Do While ActiveDocument.Paragraphs.Count 0
If Len(ActiveDocument.Paragraphs.Last.Range.Text) 1 Then
MsgBox ActiveDocument.Paragraphs.Last.Range.Text
ActiveDocument.Paragraphs.Last.Range.Delete
Else
If MsgBox("Deleting last paragraph which will automatically
recreate. Do you want to continue?", vbQuestion + vbYesNo, "End of
the Road") = vbYes Then
ActiveDocument.Paragraphs.Last.Range.Delete
Else
Exit Sub
End If
End If
Loop
End Sub

It will run indefinately or until tire of proving it otherwise as each
time the final paragraph is deleted it will recreate itself.