Adding a graphic in a word object

T

Tom Ross

I have a Purchase Order Access form that generates a Word Document with the
desired content. On the PO form there are several checkboxes that indicate
flags to be placed on the purchase order
..
I use the following code in the process.

-----------
With objWord.ActiveDocument.Bookmarks

If bolMTR Then .item("mtr").Range.Text = Chr(129) & " Certified Mill
Test Reports Required (2 copies)"
If bolMSDS Then .item("msds").Range.Text = Chr(129) & " Material
Safety Data Sheets Required (2 copies)"
If bolCOC Then .item("coc").Range.Text = Chr(129) & " Certificate of
Compliance (2 copies)"
-------------

the Chr(129) prints an empty checkbox. I would like it to print a checked
checkbox.

I guess I can do that
by changing the font and printing a wingding character
inserting a small graphic into that line of the word document

Unfurtunely I can't figure out how do do either. Anybody have any hints.
 
G

Graham Mandeno

Hi Tom

Try the InsertSymbol method:
range.InsertSymbol 254, "Wingdings"

Wingdings 254 is a box with a tick (check) in it

Others you may find useful are:
168: empty box (same size and weight)
253: box with a cross (x)
251: cross (x) without a box
252: tick (check) without a box
 
T

Tom Ross

Fantastic advice. Thanks. Now all the fonts and symbols are available.


Graham Mandeno said:
Hi Tom

Try the InsertSymbol method:
range.InsertSymbol 254, "Wingdings"

Wingdings 254 is a box with a tick (check) in it

Others you may find useful are:
168: empty box (same size and weight)
253: box with a cross (x)
251: cross (x) without a box
252: tick (check) without a box

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Tom Ross said:
I have a Purchase Order Access form that generates a Word Document with the
desired content. On the PO form there are several checkboxes that
indicate
flags to be placed on the purchase order
.
I use the following code in the process.

-----------
With objWord.ActiveDocument.Bookmarks

If bolMTR Then .item("mtr").Range.Text = Chr(129) & " Certified Mill
Test Reports Required (2 copies)"
If bolMSDS Then .item("msds").Range.Text = Chr(129) & " Material
Safety Data Sheets Required (2 copies)"
If bolCOC Then .item("coc").Range.Text = Chr(129) & " Certificate of
Compliance (2 copies)"
-------------

the Chr(129) prints an empty checkbox. I would like it to print a checked
checkbox.

I guess I can do that
by changing the font and printing a wingding character
inserting a small graphic into that line of the word document

Unfurtunely I can't figure out how do do either. Anybody have any hints.
 

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