View Single Post
 
Old 02-25-2016, 09:09 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

I don't' have time to code this for you, but the first thing I would do is abandon the selection approach:

Code:
Sub Z_BCR3ContentNewX()
Dim Reference As String
Dim strTopLine As String
Dim HOR As String
Dim ToAll As String
Dim oRng As Word.Range
Dim oFld As Field
  Set oRng = Selection.Range
  With oRng
    With .Font
      .Size = 10
      .Name = "Arial"
    End With
    strTopLine = InputBox("Top Line?, If blank remember to remove line", "")
    If strTopLine <> vbNullString Then
      .Text = strTopLine & vbCr
      .Paragraphs.Last.SpaceAfter = 12
    End If
    .Collapse wdCollapseEnd
    Set oFld = Fields.Add(oRng, wdFieldEmpty, "MERGEFIELD LQCASE_NAME", True)
    .End = oFld.Result.End
    .Collapse wdCollapseEnd
    .Text = vbCr
    .Collapse wdCollapseEnd
    Set oFld = Fields.Add(oRng, wdFieldEmpty, "MERGEFIELD ADD", True)
    .End = oFld.Result.End
    .Collapse wdCollapseEnd
    .Text = vbCr
    .Paragraphs.Last.SpaceAfter = 12
    .Collapse wdCollapseEnd
    HOR = InputBox("Highlighted OR?", "")
    If HOR <> vbNullString Then
      .Text = HOR & vbCr
      .HighlightColorIndex = wdTurquoise
      .Paragraphs.Last.SpaceAfter = 36
    End If
    .Collapse wdCollapseEnd
    .Text = "Our Ref:"
    .Bold = True
    .Collapse wdCollapseEnd
    'and so on
  End With
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote