Re: Inserting blank page into document

From: Jezebel (frolly_at_mkkk.com)
Date: 04/07/04


Date: Wed, 7 Apr 2004 17:38:23 +1000

Instead of a page break insert a new page section break. Then change the
headers and footers in the last section --

.LinkToPrevious = FALSE
.Range.Text = "" (or whatever you want)

"rlampky" <rlampky@NOSPAM.hotmail.com> wrote in message
news:uFRhjbGHEHA.2744@TK2MSFTNGP10.phx.gbl...
> Cross posted to vba.beginners and word.formatting.longdoc
>
> I am using the following Macros to locate the end of the active document
and
> then inserting a page break prior to inserting an Autotext entry in a word
> document. The prior sections are protected forms.The insert section
selected
> by the gotoend macro is an unprotected section.
>
> ? how do I cause the new page to open without the headers or footers of
the
> current document
>
> Sub gotoend()
> '
> ' gotoend Macro
> ' Macro created 4/6/2004 by rjaco
> '
> Selection.GoTo What:=wdGoToBookmark, Name:="end"
> With ActiveDocument.Bookmarks
> .DefaultSorting = wdSortByName
> .ShowHidden = False
> End With
>
>
> End Sub
>
> Sub Macro2()
> '
> ' Macro2 Macro
> ' Macro recorded 4/6/2004 by rjaco
> '
> Application.Run MacroName:="gotoend"
> Selection.InsertBreak Type:=wdPageBreak
> ActiveDocument.AttachedTemplate.AutoTextEntries("test").Insert Where:=
_
> Selection.Range, RichText:=True
> End Sub
>
>



Relevant Pages

  • Re: Inserting blank page into document
    ... headers and footers in the last section -- ... > by the gotoend macro is an unprotected section. ... > End Sub ...
    (microsoft.public.word.vba.beginners)
  • Re: Inserting blank page into document
    ... headers and footers in the last section -- ... > by the gotoend macro is an unprotected section. ... > End Sub ...
    (microsoft.public.word.formatting.longdocs)
  • Re: Help adding footer info on all pages
    ... update the fields in the range of the respective headers and footers. ... Much easier than using code to create headers and footers. ... Private Sub cmdOK_Click ... Dim secTemp As Section ...
    (microsoft.public.word.vba.general)
  • Re: How to Automatically Update Links Word 2003
    ... Headers, Footers, Textboxes, etc. ... Sub FindAndReplaceFirstStoryOfEachType() ... Dim myStoryRange As Range ... > Dim rngDoc As Range ...
    (microsoft.public.word.vba.customization)
  • Re: run time error 5
    ... the Workbook_Open sub procedure everything works OK. ... > that area on the sheet 'Headers' that actually contains data. ... > Dim HeadersTable As Range ... > In the Workbook_Open subprocedure i have the following: ...
    (microsoft.public.excel.programming)