Results 1 to 3 of 3

Thread: [RESOLVED] Insert text in bold

  1. #1

    Thread Starter
    Lively Member rocket0612's Avatar
    Join Date
    Feb 2005
    Location
    Belfast, Northern Ireland
    Posts
    95

    Resolved [RESOLVED] Insert text in bold

    I am using the following code:

    VB Code:
    1. wrd.ChangeFileOpenDirectory _
    2. "...insert path here"
    3. wrd.Documents.Open FileName:="template name.doc", ReadOnly:=True, AddToRecentFiles:=False
    4.  
    5. wordarray = Array(add1, add2, add3, add4, add5, MemNo, today, Yourref, WFI, sal, P1, P1A, P1B, P2, P4, P5, P6, P7, P8, P9, P11, P12, SIGNOFF, signed, _
    6. MemNo, today, cancdate, comwording, widow, MemNo, PHName, widow, spousename, today, comdate, OMOsec, PRFV, PR0, PR5, Annsec, _
    7. com1, com2, com3, com4, IFAcom, com5, IFA, com6, IFAtel, OMOsec, Annsec, WFI, X, X, endsec)
    8.  
    9.  
    10. wrd.ActiveDocument.Fields(1).Select
    11.     With wrd.Selection
    12.     .InsertAfter Text:=Addressee
    13.     End With
    14.  
    15.    For wrdroutine = 0 To 54
    16.     wrd.Selection.NextField.Select
    17.     With wrd.Selection
    18.     .InsertAfter Text:=wordarray(wrdroutine)
    19.     End With
    20.  
    21. Next

    In certain circumstances I want some text to be inserted in bold. The problem is the same text will in other circumstances just need to be plain. eg in one occassion add1 will be plain but if certain criteria are met it will need to be bold. Once I know if it is to be bold, how can I change it to be bold using the above code?

    thanks alot
    The Box Said: "You need Windows Vista or better" ... So I Installed LiNUX

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Insert text in bold

    select it and then use Selection.Font.Bold

  3. #3

    Thread Starter
    Lively Member rocket0612's Avatar
    Join Date
    Feb 2005
    Location
    Belfast, Northern Ireland
    Posts
    95

    Re: Insert text in bold

    thanks alot, so simple!
    The Box Said: "You need Windows Vista or better" ... So I Installed LiNUX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width