RE: section break/insert file
- From: Jean-Guy Marcil <JeanGuyMarcil@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 22 May 2008 10:21:00 -0700
"bryan" wrote:
I replied too soon.
In the form it looks good, however when doing a print preview, there is no
section break. I inserted code when adding a file like this which takes care
of the print preview so there is a section break, but then when deleting I
I do not understand. You state "there is no section break", followewd by "so
there is a section break"...
Which is it? Either there is a break or there isn't...
loose the header and footer:
Read my previous post again. I think I exhausted all possible situations on
this topic. If you are loosing your header/footer, you are not doing it
right. I gave you you many ways to handle that depending on the actual
content of the document you are working with.
'With ActiveDocument
'ActiveDocument.Unprotect
'Set meNotice = ActiveDocument.Sections(ActiveDocument.Sections.Count).Range
' meNotice.Select
' Selection.Find.Text = "Remove Form"
' If Selection.Find.Execute Then
' Selection.MoveRight Unit:=wdCharacter, Count:=2
' Selection.InsertAfter Chr$(13)
' Selection.MoveRight Unit:=wdCharacter, Count:=2
' Selection.InsertAfter Chr$(13)
' End If
'ActiveDocument.Protect wdAllowOnlyFormFields, NoReset
'End With
Is there code I need when deleting to remove the chr$(13)?
And do this before or after this code to delete:
Dim rnge As Range
Set rnge = ActiveDocument.Sections.Last.Range
rnge.Start = rnge.Start - 1
rnge.Delete
If I leave out the code to insert the chr$(13) the form looks fine but, the
print preview does not have the section break
Hard to help you as I do not know how/when you insert the said setion break...
Would appreciate any help?
Working wih section breaks is tricky because of the many different
combination you can face (Different Odd/Even, Different First Page, whethere
they are linked or not, etc.)
First, you seem confused by the presence/absence of a section break. You
have to first ascertain if there is a section break or not. Go into
Normal/Draft view. A section break will be reprsented by a double dotted
line. Can you see such a line?
Also, you have to identify why the print preview gives you a different page
set up... Are there any hidden characters?
If you need to post back, explain in details how the document you are
testing the code with was created. Also describe its content, inlcuding the
type of headers/footers, number of sections, etc.
.
- Follow-Ups:
- RE: section break/insert file
- From: bryan
- RE: section break/insert file
- References:
- RE: section break/insert file
- From: Jean-Guy Marcil
- RE: section break/insert file
- From: bryan
- RE: section break/insert file
- Prev by Date: RE: section break/insert file
- Next by Date: RE: pausing and resume
- Previous by thread: RE: section break/insert file
- Next by thread: RE: section break/insert file
- Index(es):
Relevant Pages
|
Loading