View Single Post
 
Old 10-23-2019, 12:30 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Your template doesn't have any graphics in the header so not sure about that part of your request, however when you set the .Range.Text you are replacing whatever used to be there.

Because you are using a template, it should already have the placeholder text sitting in the header/footers and it should already be styled. This dramatically reduces the things you need to do with your code. You can also use Linked Content Controls to further minmise the code. For instance, if your Content Control was linked to the document's Keywords Property you could just do...
Code:
Private Sub cmdSetClassification_Click()
  ' prepare header footers..
  Dim sHeadFooter As String
  sHeadFooter = Me.txtFurtherInfo.Text
  ActiveDocument.BuiltInDocumentProperties("Keywords") = sHeadFooter
  Unload Me
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote