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
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