Insert include picture in label object using vba

Posted on 1999-12-19
Medium Priority
Last Modified: 2008-02-20
I'm not sure how to get a logo/bitmap to print with a label using vba.  I can insert the graphic on top of the label using the User Interface, but can't seem to do the same via code.  Any ideas?  The code inserts the text portion of the includepicture function only.

Everything else seems to work fine in code, including label and envelope selection.
Question by:billinb

Accepted Solution

antrat earned 320 total points
ID: 2294032
Hi billinb

Does this help?

The DataObject and the Clipboard both provide a means to move data from one place to another. As an application developer, there are several important points to remember when you use either a DataObject or the Clipboard:

·      You can store more than one piece of data at a time on either a DataObject or the Clipboard as long as each piece of data has a different data format. If you store data with a format that is already in use, the new data is saved and the old data is discarded.
·      The Clipboard supports picture formats and text formats. A DataObject currently supports only text formats.
·      A DataObject exists only while your application is running; the Clipboard exists as long as the operating system is running. This means you can put data on the Clipboard and close an application without losing the data. The same is not true with the DataObject. If you close the application that put data on a DataObject, you lose the data.

·      A DataObject is a standard OLE object, while the Clipboard is not. This means the Clipboard can support standard move operations (copy, cut, and paste) but not drag-and-drop operations. You must use the DataObject if you want your application to support drag-and-drop operations.

Tip   You can define your own data format names when you use the SetText method to move data to the Clipboard or a DataObject. This can help distinguish between text that your application moves and text that the user moves.


Author Comment

ID: 2294184
Q123312 and
Q85442 on the knowledgebase sort of point to the same thing, that is I think I may have to use a mailmerge field and a table.  (I don't really want to do it this way.)

However I think I'm missing something, as far as the operation of Word, I'll read up more on OLE objects.

I'm using Word 97.

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Are you looking to start a business? Do you own and operate a small company? If so, here are some courses you need to take before you hire a full-time IT staff.
This tutorial is about creating a new Microsoft Online User Profile account along with how to transfer your files and settings. You may be faced with this situation if your existing user profile has become corrupted.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question