Inserting a graphic into a text line at a bookmark

T

Tom Ross

Inserting a graphic into a text line at a bookmark

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

Alex Ivanov

Set r= .item("msds").Range
'Use Chr(168) for empty box, so they will look similar
r.Text = Chr(254) & " Material Safety Data Sheets Required (2 copies)"
r.characters.first.font.name="wingdings"
 
T

Tom Ross

Thanks Alex

Alex Ivanov said:
Set r= .item("msds").Range
'Use Chr(168) for empty box, so they will look similar
r.Text = Chr(254) & " Material Safety Data Sheets Required (2 copies)"
r.characters.first.font.name="wingdings"
 

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