M
Mickey
Hi,
I have a template that I would like to share. When I originally wrote it
(thanks to everyone for the help provided) I wrote a macro that called for an
autotext. At the time the autotext was stored in Normal.dot. I created a
new template with the macros and calls out the autotexts. I put the
autotexts in the new template also. I tried to share it but it looks for the
autotext to be in the Normal.dot template and not the new template. The
following is the macro. The new template I created is named "QPACE". I
thought I could change "NormalTemplate.AutoTextEntries("SOP")." to
"QPACETemplate".AutoTextEntries("SOP") and it would work, but it doesn't.
Any suggestions. As always thanks so much for any help provided.
Mickey
Sub AddHeaderSOP()
Dim r As Range
Dim s As Section
For Each s In ActiveDocument.Sections
Set r = s.Headers(wdHeaderFooterPrimary) _
.Range.Paragraphs(1).Range
With r
.ParagraphFormat.TabStops.ClearAll
.ParagraphFormat.TabStops(InchesToPoints(1.25)) _
.Alignment = wdAlignTabLeft
.ParagraphFormat.TabStops(InchesToPoints(6.5)) _
.Alignment = wdAlignTabRight
.Collapse wdCollapseStart
.Collapse wdCollapseEnd
If s.Index = 1 Then
NormalTemplate.AutoTextEntries("SOP").Insert _
Where:=r, RichText:=True
Else
NormalTemplate.AutoTextEntries("SOP2").Insert _
Where:=r, RichText:=True
End If
End With
Next s
End Sub
I have a template that I would like to share. When I originally wrote it
(thanks to everyone for the help provided) I wrote a macro that called for an
autotext. At the time the autotext was stored in Normal.dot. I created a
new template with the macros and calls out the autotexts. I put the
autotexts in the new template also. I tried to share it but it looks for the
autotext to be in the Normal.dot template and not the new template. The
following is the macro. The new template I created is named "QPACE". I
thought I could change "NormalTemplate.AutoTextEntries("SOP")." to
"QPACETemplate".AutoTextEntries("SOP") and it would work, but it doesn't.
Any suggestions. As always thanks so much for any help provided.
Mickey
Sub AddHeaderSOP()
Dim r As Range
Dim s As Section
For Each s In ActiveDocument.Sections
Set r = s.Headers(wdHeaderFooterPrimary) _
.Range.Paragraphs(1).Range
With r
.ParagraphFormat.TabStops.ClearAll
.ParagraphFormat.TabStops(InchesToPoints(1.25)) _
.Alignment = wdAlignTabLeft
.ParagraphFormat.TabStops(InchesToPoints(6.5)) _
.Alignment = wdAlignTabRight
.Collapse wdCollapseStart
.Collapse wdCollapseEnd
If s.Index = 1 Then
NormalTemplate.AutoTextEntries("SOP").Insert _
Where:=r, RichText:=True
Else
NormalTemplate.AutoTextEntries("SOP2").Insert _
Where:=r, RichText:=True
End If
End With
Next s
End Sub