Set selection.bookmark to wdTitleCase

L

Lee

I need to set a text selection in a userform to title
case. Unsure how to do this...
Coding =

Sub Form()

'Set variables to hold form data

strcontrno = frmCPP.TxtContractNumber
strcontrname = frmCPP.TxtContractName

ActiveDocument.Bookmarks("footerno").Select
Selection.TypeText Text:=strcontrno
ActiveDocument.Bookmarks("footername").Select
Selection.TypeText Text:=strcontrname
ActiveDocument.Bookmarks("footerno2").Select
Selection.TypeText Text:=strcontrno
ActiveDocument.Bookmarks("footername2").Select
Selection.TypeText Text:=strcontrname
ActiveDocument.Bookmarks("contractno").Select
Selection.TypeText Text:=strcontrno
ActiveDocument.Bookmarks("contractname").Select
Selection.TypeText Text:=strcontrname
'(This is the code that I need to set to Title Case)


'Save the document

Dialogs(wdDialogFileSaveAs).Show
ActiveDocument.ActiveWindow.View.Type = wdPrintView

End Sub

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top