Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print a Tick in Word from VBA

Status
Not open for further replies.

mcgibbong

Programmer
Jan 17, 2002
38
GB
I have several forms which have tick boxes. For most of them I can translate the answer to Yes or No for printing on the Word Document that I am populating with the forms. Unfortunately thete are 2 which require me to print a tick in a box. I can find this in Symbols in Word, but cant find out how to print it using VBA. Any Help?

 
Not sure what you mean by how to PRINT it. You can insert a check mark into a document using the insertsymbol method, for example:

Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3842, _
Unicode :=True

Is that what you're looking for?
Rob
[flowerface]
 
Not sure what you mean by how to PRINT it. You can insert a check mark into a document using the insertsymbol method, for example:

Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3842, _
Unicode :=True

Is that what you're looking for?
Rob
[flowerface]
 
Rob,

Thanks thats great but and there is always a but how can I put it from the Code in the form onto the word document.

I am using the tag on the properties to pass the VBA Controls to the word document ie The text box would be TXTTele and the tag would be Tel and the document would contain {Docvariable Tele /*MERGEFORMAT }. Excuse my ignorance, but how would I use the insertSymbol method to get this Character from the Code onto the Word Document?

Gary
 
My Word VBA knowledge is limited. Can't you move your selection to the bookmark where you need the checkmark, and insert it there? How do you put your yes/no into Word right now? You should be able to use the same kind of procedure for the checkmark.
If that doesn't make sense, some short sections of your code illustrating what you're trying to do would be helpful.
Rob
[flowerface]
 
Hi,

try using the
Code:
Selection.FormFields(1).Result
where 1 is the index of your formfield. This property will read or set the text that is shown in the field.
You could also use a formfield's name - you can find that in the Properties window for that field

HTH

Cheers
Nikki ;-)
 
Thanks for all your help. -
I eventually use a mixture of all suggestions and cheated by setting the font on the word document to be WingDings 2 and printing a P to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top