10 most common problems for successful headers-footers?

G

gil

What are the 10 most common problems in using headers and footers when using
different first pages? For 10 years I've recommended that users avoid them
unless they have to. I spent another several hours this morning trying to
learn how to get the section headers not to

insert section page break at bottom of file

insert hard Page so you can have a nonfirst page header

view header

break link

page setup different first page

go to footer and break link

go to page format, break link, select start at new page number 1

go back to header

make sure you're in current section NOT first page, break link if it changed
back on you

insert your non-first page header

move to first page header make sure it's empty

go to prior section, make sure it's not been linked to later section's
headers,

then do the same whole sequence for the footers

ABSOLUTELY ESSENTIAL TO BREAK THE LINK EACH TIME YOU ENTER A HEADER OR
FOOTER BOX BEFORE ANY TEXT ENTRY. Any text entry seems to replace the prior
sections headers instantly.

YOU CANNOT PLACE A HEADER FOR NON-FIRST PAGE HEADERS UNTIL AFTER YOU MAKE A
SECOND PAGE.



TIA

Long time sufferer
 
G

gil

I guess my prior note just goes to show that I need to take a break. :)

I had intended to say:



What are the 10 most common problems in using headers and footers when using
different first pages? For 10 years I've recommended that users avoid them
unless they absolutely have to. I spent another several hours this morning
trying to learn how to get the section headers not to somehow keep replacing
a prior section's header.



My sequence looks something like:

insert section page break

insert hard Page

view header

break link

page setup different first page

go to footer and break link

go to page format, break link, select start at new page number 1

go back to header

make sure you're in current section NOT first page, break link if it changed
back on you

insert your non-first page header

move to first page header make sure it's empty

go to prior section, make sure it's not been copied to prior section's
headers,

then do the same whole sequence for the footers

It seems ABSOLUTELY ESSENTIAL TO BREAK THE LINK EACH TIME YOU ENTER A HEADER
OR FOOTER BOX BEFORE ANY TEXT ENTRY. Any text entry seems to replace the
prior sections headers instantly.

YOU CANNOT PLACE A HEADER FOR NON-FIRST PAGE HEADERS UNTIL AFTER YOU MAKE A
SECOND PAGE.
 
G

gil

Hi All,

I think it would be useful to have a button on the headers footers toolbar,
that automatically creates a new section with different first pages for
headers and footers with pagination starting on the 2nd page, and moving the
user to enter the new header and footer. Does anyone here have code that
will perform this?

Gil
 
S

Stefan Blom

Indeed, by default each header (footer) is linked to the corresponding
type of header (footer) in the previous section. Obviously, when you
are enabling the "Different first page" option, more work is required
to unlink headers (and/or footers). Note, however, that you may not
need to unlink. What contents are you adding? If you are referencing
something from the main body of the document, a STYLEREF field could
do the job. See
http://sbarnhill.mvps.org/WordFAQs/HeaderFooter.htm and the first
section of http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm.
 
G

gil

Hi Stefan,
Yes, I am trying to develop code to adjust headers automatically. But if I
cannot get Word to do my headers by the basic entry method, the likelihood
of my succeeding with code would be very low. I have looked at styfle refs
in the past, but only for an hour. I'd like to get my feet on the ground
first before exploring a whole new arena. I have found that each new major
exploration often takes a few months before you see how it affects all your
prior programming.
Do you see any obvious errors in my sequence at the bottom of this msg?
TIA
:)
Gil
 
G

gil

Hi Carol,
I looked at the article you referenced, and it seems pretty familiar. But I
am not deleting any section breaks in my actions. I do understand that
hidden material like "reveal codes" is in the section breaks and at the end
of files, and they contain the formatting information for the material
immediately before it, after the prior section break.
:)
Gil
 
G

gil

Hi Carol and all,
Actually, I am a developer for electronic medical records, based on Word. Each patient has a file dedicated to them. In years past, I have used "work arounds" that avoid the complexities of Word's headers and sections so as not to confuse users. Some users however are interested in using and preserving section breaks and headers unchanged in patient files. So, once again, I have dived into the deep end.

I am seeking to have a single macro that adds a "traditional letter format."

:)
Gil
http://www.TenSecondMedicalRecord.com
 
G

Guest

Why not read Suzanne's article regarding letterhead and you can create a
template and a macro to invoke it.
 
G

gil

Hi Carol,
I appreciate your thoughts. :)

Answer: because the letters here need to be a part of the document rather
than separate documents. The flow of the patient file looks like:
first appointment 7-1-05
telephone appointment 8-1-05
2nd appt 9-1-05
letter to patient 10-01-05
letter to specialist 11-01-05
3rd appt 12-01-05, .....

Is it possible to make separate document for each and every service for each
patient? Yes, but it would be at great cost and complexity and loss of
efficiency.

So, ... I seek to make multisection headers and footers work. Currently I
am checking out Charles Kenyon's website ideas . So I am trying even and
odd page headers to see if that will resolve my problems of just having
different first page header-footers.

:)
Gil
 
G

Guest

Sorry I couldn't help you! I'm sure one of the experts here will be able to
add something!
 
R

Robert M. Franz (RMF)

Hi Gil
Answer: because the letters here need to be a part of the document rather
than separate documents.

Bad idea (IMHO).

The flow of the patient file looks like:
first appointment 7-1-05
telephone appointment 8-1-05
2nd appt 9-1-05
letter to patient 10-01-05
letter to specialist 11-01-05
3rd appt 12-01-05, .....

Is it possible to make separate document for each and every service for each
patient? Yes, but it would be at great cost and complexity and loss of
efficiency.

I don't see the overhead for using one file for each service (you can
have them in one patient-specific folder) versus trying to juggle
different "documents" or even types of documents in one single file.
Especially not in one single Word file ... :)

So, ... I seek to make multisection headers and footers work. Currently I
am checking out Charles Kenyon's website ideas . So I am trying even and
odd page headers to see if that will resolve my problems of just having
different first page header-footers.

I think by now, you are having a good idea of Word's sections and their
properties. Headers and Footers are one of them. They can (and are by
default) linked (though off the top of my head, I'm not sure what
happens in a document where you have already unlinked H&F and then
insert a section break). Different First (or Odd/Even) Page settings
have specific meanings, and it's not clear to me by observing your
sequence why you'd need either of those properties set in the first place.

Yes, I'm pretty sure you can insert a new section in code by other means
of actually inserting a section break (like, inserting a new section in
the sections collection and setting the sections' properties in one go).
Best place to look for such code would be one of the .vba newsgroups.

I fail to see the benefit in your case, why it would be necessary to
juggle with that in one possibly huge file. What should the file be good
for? As a record? Sounds like a database application.

YMMV
Robert
 
S

Stefan Blom

(though off the top of my head, I'm not sure what
happens in a document where you have already unlinked H&F and then
insert a section break).

The headers and footers of the new section will be linked...

--
Stefan Blom
Microsoft Word MVP


in message
 
R

Robert M. Franz (RMF)

Hi Stefan

Stefan said:
The headers and footers of the new section will be linked...

Thanks for confirming this. ISTR being able to create new sections,
through the UI, with unlinked headers -- probably that was by copying
section breaks (those following the desired section, of course :)).

Greetings
Robert
 
G

gil

Hi All,

Thanks for your thoughts.
I agree with Robert that it's a bad idea for the letters to go in sequence
as part of a patient chart, ... mainly bcz it is not fluent in Word to do
so. I do not see why it could not be done, except for it being darn
difficult to get it to work.
The reason for a single file rather than multiple files or data bases is
Work Speed. If something takes an extra three seconds 50 times per day in
the physician world, it costs money and quality. This is because there are
many other things that are also taking extra time and they are often menial.
Data bases present major problems when you're the one filling in all the
fields. A typical data base electronic medical record (EMR) may have a
thousand fields. If you're the one having to fill in all those fields and
you have only 15-30 minutes per patient, it is a painful reduction in the
quality and quantity of your service. And then you still don't have the
broad flexibility of MS Word. Word is truly the best form for EMR's.
Four to five years ago, I programmed "traditional letters" (H/F etc) to work
in my EMR, but only by automated removal of all prior sections and H/F. And
actually, that does work just fine. It's not the end of the world that I
don't retain H/F on prior letters.
Cheers,
Gil
 
G

gil

Hi All,

I think I've found a work around for initiating new Header/Footers in an
existing document. A code sample is shown below.



The following code placed at the end or your multipage letter enters an
autotext called "sectHF5" which is comprised of an "empty" two lines of
non-first page header and a non-first page footer with centered page number.
It then substitues some variables ("ptNamx" and "ptDob") and an autotext
"myName" from normal.dot. The variables and autotext replace invisible
white colored text ("z.") in each of two lines of header and then converts
them to black.



The user has to be aware not to remove the section break at the bottom of
the file.



One has to make an initial autotext entry for the "blank header" and and
save it as "sectHF5" to normal.dot.



Making a "blank header section break" can be tricky. When making it, you
might need to have a hard page break above the section break in order to
reach "different first pages" in the blank headers.



Why all this? It seems that Word keeps the initial making of a file's H/F
in the last paragraph mark of the entire file. I'm not sure it ever
disappears despite make intervening section breaks. By having exactly two
lines in the header that are blank, one can code for their removal or
replacement. If you try to code deleting 3 header lines here, you might be
deleting a first line of footer information.



Cheers,

Gil

http://www.TenSecondMedicalRecord.com



-------------------

Sub Macro31()

'

' Macro31 Macro

' Macro recorded 1/26/2007 by Gil Carter

'



Application.DisplayAutoCompleteTips = True

NormalTemplate.AutoTextEntries("sectHF5").Insert Where:=Selection.Range,
_

RichText:=True

Selection.MoveUp Unit:=wdLine, Count:=3

If ActiveWindow.View.SplitSpecial <> wdPaneNone Then

ActiveWindow.Panes(2).Close

End If

If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _

ActivePane.View.Type = wdOutlineView Then

ActiveWindow.ActivePane.View.Type = wdPrintView

End If

ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

Selection.TypeText Text:="re: "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Selection.MoveLeft Unit:=wdCharacter, Count:=1

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeText Text:=ptNamx & ", dob " & ptDob & ", date "

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:=
_

"DATE \@ ""MMMM d, yyyy"" ", PreserveFormatting:=True

Selection.TypeText Text:=" "

Selection.MoveRight Unit:=wdCharacter, Count:=1

Selection.TypeText Text:="by "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Application.DisplayAutoCompleteTips = True

Templates.Application.NormalTemplate.AutoTextEntries("myName").Insert
_

Where:=Selection.Range, RichText:=True

Selection.TypeText Text:=" "

ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End Sub
 
G

gil

Hi All,

I hope this formatting works better than what I just posted:



I think I've found a work around for initiating new Header/Footers in an
existing document.

The following code placed at the end or your multipage letter enters an
autotext called "sectHF5" which is comprised of an "empty" two lines of
non-first page header and a non-first page footer with centered page number.
It then substitues some variables ("ptNamx" and "ptDob") and an autotext
"myName" from an attached template. The variables and autotext replace
invisible white colored text ("z.") in each of two lines of header and then
converts them to black.

The user has to be aware not to remove the section break at the bottom of
the file.

One has to make an initial autotext entry for the "blank header" and and
save it as "sectHF5" to normal.dot.

Making a "blank header section break" can be tricky. When making it, you
might need to have a hard page break above the section break in order to
reach "different first pages" in the blank headers.


Why all this? It seems that Word keeps the initial making of a file's H/F
in the last paragraph mark of the entire file. I'm not sure it ever
disappears despite make intervening section breaks. By having exactly two
lines in the header that are blank, one can code for their removal or
replacement. If you try to code deleting 3 header lines here, you might be
deleting a first line of footer information.



Cheers,

Gil



-------------------

Sub Macro31()

'

' Macro31 Macro

' Macro recorded 1/26/2007 by Gil Carter

'



Application.DisplayAutoCompleteTips = True
NormalTemplate.AutoTextEntries("sectHF5").Insert Where:=Selection.Range,
_
RichText:=True

Selection.MoveUp Unit:=wdLine, Count:=3

If ActiveWindow.View.SplitSpecial <> wdPaneNone Then

ActiveWindow.Panes(2).Close

End If

If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _

ActivePane.View.Type = wdOutlineView Then

ActiveWindow.ActivePane.View.Type = wdPrintView

End If

ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

Selection.TypeText Text:="re: "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Selection.MoveLeft Unit:=wdCharacter, Count:=1

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeText Text:=ptNamx & ", dob " & ptDob & ", date "

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:=
_

"DATE \@ ""MMMM d, yyyy"" ", PreserveFormatting:=True

Selection.TypeText Text:=" "

Selection.MoveRight Unit:=wdCharacter, Count:=1

Selection.TypeText Text:="by "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Application.DisplayAutoCompleteTips = True

Templates.Application.NormalTemplate.AutoTextEntries("myName").Insert
_

Where:=Selection.Range, RichText:=True

Selection.TypeText Text:=" "

ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End Sub
 
G

gil

Yet another try, ... guess I don't post all that often.

I hope this formatting works better than what I just posted:

I think I've found a work around for initiating new Header/Footers in an existing document.

The following code placed at the end or your multipage letter enters an autotext called "sectHF5" which is comprised of an "empty"
two lines of non-first page header and a non-first page footer with centered page number. It then substitues some variables
("ptNamx" and "ptDob") and an autotext "myName" from an attached template. The variables and autotext replace invisible white
colored text ("z.") in each of two lines of header and then converts them to black.

The user has to be aware not to remove the section break at the bottom of the file.

One has to make an initial autotext entry for the "blank header" and and save it as "sectHF5" to normal.dot.

Making a "blank header section break" can be tricky. When making it, you might need to have a hard page break above the section
break in order to reach "different first pages" in the blank headers.


Why all this? It seems that Word keeps the initial making of a file's H/F in the last paragraph mark of the entire file. I'm not
sure it ever disappears despite make intervening section breaks. By having exactly two lines in the header that are blank, one can
code for their removal or replacement. If you try to code deleting 3 header lines here, you might be deleting a first line of
footer information.



Cheers,

Gil



-------------------

Sub Macro31()

'

' Macro31 Macro

' Macro recorded 1/26/2007 by Gil Carter

'



Application.DisplayAutoCompleteTips = True

NormalTemplate.AutoTextEntries("sectHF5").Insert Where:=Selection.Range, _

RichText:=True

Selection.MoveUp Unit:=wdLine, Count:=3

If ActiveWindow.View.SplitSpecial <> wdPaneNone Then

ActiveWindow.Panes(2).Close

End If

If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _

ActivePane.View.Type = wdOutlineView Then

ActiveWindow.ActivePane.View.Type = wdPrintView

End If

ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

Selection.TypeText Text:="re: "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Selection.MoveLeft Unit:=wdCharacter, Count:=1

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeText Text:=ptNamx & ", dob " & ptDob & ", date "

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _

"DATE \@ ""MMMM d, yyyy"" ", PreserveFormatting:=True

Selection.TypeText Text:=" "

Selection.MoveRight Unit:=wdCharacter, Count:=1

Selection.TypeText Text:="by "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Application.DisplayAutoCompleteTips = True

Templates.Application.NormalTemplate.AutoTextEntries("myName").Insert _

Where:=Selection.Range, RichText:=True

Selection.TypeText Text:=" "

ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End Sub
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Gil:

This thread seems to have wandered off the track a little :)

It's neither difficult nor undesirable to do what you want in Word.

Yes, you are quite correct that the Header and footer for a page are
controlled by the section break that most immediately FOLLOWS the page in
the file.

When I say "Controls" I mean that there may be eight section breaks in a
document. If all of their headers and all of their footers are set to "Same
As Previous", the headers and footers will actually be stored in the very
last section break in the file.

The last section break is a special case: it is the default OLE object store
for the file and is hidden below the last paragraph mark in the document.
It contains not only the headers and footers but almost everything else in
the document excepting the text.

When you add section breaks to a document, each one becomes an exact copy of
the one following it. This is a bit counter-intuitive, so commit it to
memory -- it's the key to working with section breaks :)

Assuming that you break the "Same as previous link", each section break
stores three headers and three footers: First Page, Left Page and Right
Page. The structure of the headers and footers is always there, but each
specific header or footer is not populated until you put something in it.
Once the headers and footers have been populated in a document, you can't
remove them, although you can either delete their content or hide them.

So when working with headers and footers, the first thing you need to do is
set up the default section break in the document. Then each time you insert
a new one, it will have most of the properties you need.

If you're working in VBA, you simply iterate the Stories collection. Here's
some running code that first imports a set of AutoTexts from the template
then adds them to the headers and footers as required, then sets exact
dimensions for them. The headers in this case were expressed as single
vector graphic files that contained a logo. The document itself is set up
for double-sided printing with headers and footers different first/left/ and
right. The routine down the bottom sets a variable in the document so we
can tell what version its headers and footers are.

Hope this helps

Sub ReplaceHeadersFooters()
'
' Macro to put headers and footers right
' Macro written 27 Aug 2004 by John McGhie
'
Dim aVar As Variable
Dim bHeaderDone As Boolean
Dim bStylesDone As Boolean
Dim HeaderVersion As Integer
Dim aSection As Section
Dim aHeader As HeaderFooter
Dim aFooter As HeaderFooter
Dim aStyle As Style
Dim bTrackChanges As Boolean

bTrackChanges = ActiveDocument.TrackRevisions

If ActiveDocument.Type <> wdTypeTemplate Then
Application.OrganizerCopy _
Source:=ActiveDocument.AttachedTemplate.FullName, _
Destination:=ActiveDocument.FullName, _
Name:="Header", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy _
Source:=ActiveDocument.AttachedTemplate.FullName, _
Destination:=ActiveDocument.FullName, _
Name:="HeaderLeft", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy _
Source:=ActiveDocument.AttachedTemplate.FullName, _
Destination:=ActiveDocument.FullName, _
Name:="FooterRight", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy _
Source:=ActiveDocument.AttachedTemplate.FullName, _
Destination:=ActiveDocument.FullName, _
Name:="FooterLeft", _
Object:=wdOrganizerObjectStyles
End If

For Each aSection In ActiveDocument.Sections
With aSection.PageSetup
.SectionStart = wdSectionOddPage
.DifferentFirstPageHeaderFooter = False
.OddAndEvenPagesHeaderFooter = True
.MirrorMargins = True
.Gutter = 0
.TopMargin = InsidePageMargin
.BottomMargin = BottomMargin
.LeftMargin = InsidePageMargin
.RightMargin = OutsidePageMargin
End With

With aSection.Headers(wdHeaderFooterPrimary)
.Range.Delete
ActiveDocument.AttachedTemplate.AutoTextEntries("TenderHeader").Insert
_
Where:=.Range, RichText:=True
.Range.Style = "Header"
Call FormatHeader(.Range)
End With


With aSection.Headers(wdHeaderFooterEvenPages)
.Range.Delete
ActiveDocument.AttachedTemplate.AutoTextEntries("TenderHeader").Insert
_
Where:=.Range, RichText:=True
.Range.Style = "HeaderLeft"
Call FormatHeader(.Range)
End With

With aSection.Footers(wdHeaderFooterPrimary)
.Range.Delete
.Range.Style = "FooterRight"

ActiveDocument.AttachedTemplate.AutoTextEntries("TenderFooterRight").Insert
_
Where:=.Range, RichText:=True
End With

With aSection.Footers(wdHeaderFooterEvenPages)
.Range.Delete
.Range.Style = "FooterLeft"

ActiveDocument.AttachedTemplate.AutoTextEntries("TenderFooterLeft").Insert _
Where:=.Range, RichText:=True
End With
Next ' asection

For Each aVar In ActiveDocument.Variables
If aVar.Name = "HeaderVersion" Then bHeaderDone = True
Next ' aVar
With ActiveDocument.Variables
If bHeaderDone Then
.Item("HeaderVersion").Value = intCurrHeader
Else
.Add Name:="HeaderVersion", Value:=intCurrHeader
End If
End With

With ActiveDocument
.TrackRevisions = bTrackChanges
.ShowRevisions = True
End With

End Sub

Sub FormatHeader(aHeader As Range)
' sets format of picture in header
' macro written 27 Aug 2004 by John McGhie

With aHeader.InlineShapes(1)
.Fill.Visible = msoFalse
.Fill.Transparency = 0#
.Line.Weight = 0#
.Line.Transparency = 0#
.Line.Visible = msoFalse
.LockAspectRatio = msoTrue
.Width = 453.5433
.PictureFormat.Brightness = 0.5
.PictureFormat.Contrast = 0.5
.PictureFormat.ColorType = msoPictureAutomatic
.PictureFormat.CropLeft = 0#
.PictureFormat.CropRight = 0#
.PictureFormat.CropTop = 0#
.PictureFormat.CropBottom = 0#
End With
End Sub

Yet another try, ... guess I don't post all that often.

I hope this formatting works better than what I just posted:

I think I've found a work around for initiating new Header/Footers in an
existing document.

The following code placed at the end or your multipage letter enters an
autotext called "sectHF5" which is comprised of an "empty"
two lines of non-first page header and a non-first page footer with centered
page number. It then substitues some variables
("ptNamx" and "ptDob") and an autotext "myName" from an attached template.
The variables and autotext replace invisible white
colored text ("z.") in each of two lines of header and then converts them to
black.

The user has to be aware not to remove the section break at the bottom of the
file.

One has to make an initial autotext entry for the "blank header" and and save
it as "sectHF5" to normal.dot.

Making a "blank header section break" can be tricky. When making it, you
might need to have a hard page break above the section
break in order to reach "different first pages" in the blank headers.


Why all this? It seems that Word keeps the initial making of a file's H/F in
the last paragraph mark of the entire file. I'm not
sure it ever disappears despite make intervening section breaks. By having
exactly two lines in the header that are blank, one can
code for their removal or replacement. If you try to code deleting 3 header
lines here, you might be deleting a first line of
footer information.



Cheers,

Gil



-------------------

Sub Macro31()

'

' Macro31 Macro

' Macro recorded 1/26/2007 by Gil Carter

'



Application.DisplayAutoCompleteTips = True

NormalTemplate.AutoTextEntries("sectHF5").Insert Where:=Selection.Range, _

RichText:=True

Selection.MoveUp Unit:=wdLine, Count:=3

If ActiveWindow.View.SplitSpecial <> wdPaneNone Then

ActiveWindow.Panes(2).Close

End If

If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _

ActivePane.View.Type = wdOutlineView Then

ActiveWindow.ActivePane.View.Type = wdPrintView

End If

ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

Selection.TypeText Text:="re: "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Selection.MoveLeft Unit:=wdCharacter, Count:=1

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeBackspace

Selection.TypeText Text:=ptNamx & ", dob " & ptDob & ", date "

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _

"DATE \@ ""MMMM d, yyyy"" ", PreserveFormatting:=True

Selection.TypeText Text:=" "

Selection.MoveRight Unit:=wdCharacter, Count:=1

Selection.TypeText Text:="by "

Application.Run MacroName:="Project.NewMacros.makeNormalFont"

Application.Run MacroName:="Project.makelinemedium.MAIN"

Selection.TypeBackspace

Selection.TypeBackspace

Application.DisplayAutoCompleteTips = True

Templates.Application.NormalTemplate.AutoTextEntries("myName").Insert
_

Where:=Selection.Range, RichText:=True

Selection.TypeText Text:=" "

ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End Sub

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top