|
-
Dec 12th, 2005, 03:20 AM
#1
Thread Starter
Lively Member
[RESOLVED] Insert text in bold
I am using the following code:
VB Code:
wrd.ChangeFileOpenDirectory _
"...insert path here"
wrd.Documents.Open FileName:="template name.doc", ReadOnly:=True, AddToRecentFiles:=False
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, _
MemNo, today, cancdate, comwording, widow, MemNo, PHName, widow, spousename, today, comdate, OMOsec, PRFV, PR0, PR5, Annsec, _
com1, com2, com3, com4, IFAcom, com5, IFA, com6, IFAtel, OMOsec, Annsec, WFI, X, X, endsec)
wrd.ActiveDocument.Fields(1).Select
With wrd.Selection
.InsertAfter Text:=Addressee
End With
For wrdroutine = 0 To 54
wrd.Selection.NextField.Select
With wrd.Selection
.InsertAfter Text:=wordarray(wrdroutine)
End With
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 
-
Dec 12th, 2005, 01:10 PM
#2
Re: Insert text in bold
select it and then use Selection.Font.Bold
-
Dec 14th, 2005, 04:27 AM
#3
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|