Visual Basics - programming case eg upper case/lower case

Visual Basics - programming case eg upper case/lower case

Post by Jane via O » Tue, 20 Feb 2007 06:51:37

Hi there,

Can anyone tell me how I programme my form in Visual Basics for the text to
appear as it is typed.

I have certain text that I want to appear as Upper Case eg

InsertBkMkText "Department", txtDepartment. Text, wdUpperCase

but I have other text that I need it to appear as it is typed eg

Orewa office or Hibiscus Coast Holiday Park

I don't know which command to type to make it work eg

InsertBkMkText "Location", txtLocation.Text, wd???

If I put the command wdTitleWord it will make the word 'office' appear as
'Office' or if I type it as wdSentence it will make the words 'Hibiscus Coast
Holiday Park' appear as 'Hibiscus coast holiday park' and if I just leave it
blank and don't put any wd commands in at all I get an error.

Hope this makes sense and look forward to hearing from anyone who can help.

Thanks a lot.


Message posted via

Visual Basics - programming case eg upper case/lower case

Post by debbieprob » Sun, 25 Feb 2007 21:14:41

Hi Jane

Presumably InsertBkMkText is a routine you have written and are passing
information to? If that is correct then try making the last parameter that
you need to receive an optional one. In this way, if you do not want to
specify a case you can leave it out.

For example:

Sub InsertBkMkText(strBkName as string, strInfilText as string, Optional
lngCase as Long)

When calling it:

InsertBkMkText "MyBookmark", "my bookmark text", wdUpperCase


InsertBkMkText "MyBookmark", "my bookmark text"

Alternatively, convert the case of the text before inserting it into the

I hope I've understood your question correctly. Apologies if not.


Message posted via