Ole Objects inserted into Word

S

SmogerP

I am utilizing Access97 and Word 2000. I have set up processes in Access
that creates a table that I utilize to open Word and create a Mail/Merge
document in Word. This process works great! What I am trying to do is to
add a field to our User table set up as an Ole Object and add a signature to
the field. From there I have scanned the signatures and it all seems to be
working fine until I get to WORD. In Word I add the field into the document
as a Mail/Merge field and when I run the document, all that comes up is
letters and numbers i.e. "1507DC04" This is just a sample.

How do I insert an Object into a Mail/Merged Word document?

Thanks,

Phill
 
P

Peter Jamieson

How do I insert an Object into a Mail/Merged Word document?

Word doesn't have a facility to do this.

Your best bet as far as Word is concerned is to store theimages in a format
Word can use (.e.g. .jpg, .bmp) in a normal foler in Windows, and store
either the filename or pathname in your database in a field called
picturefile or picturepath, say. Then in Windows you can use a nested merge
field such as

{ INCLUDEPICTURE "c:\\mypictures\\{ MERGEFIELD picturefile }" }
or
{ INCLUDEPICTURE "{ MERGEFIELD picturepath }" }

Use Google groups to find other recent messages containing INCLUDEPICTURE
and MERGEFIELD to find more info. on this.

In fact there are two ways you can insert your images into Access and
neither of them works with Word, but if you are going to store a lot of them
in there anyway I suggest you change the way you are doing it. You might
want to ask about this in an Access group, but the trouble is that the way
you are doing it wraps the image in an OLE wrapper which is specific to the
program set up on your machine to handle the type of graphic (.jpg,
whatever) you are storing, then (as far as I can remember) inside an Access
wrapper). So if for example you move the application to a machine which does
not have that application, the images cannot be displayed. Worse, if you are
working with (say) Office 2000 and upgrade to Office 2003 you may find that
that application is replaced by something which cannot handle the wrapped
images. There's another way to store the images by using code to store the
unwrapped image in a memo or OLE field. I don't know what the implications
of that are for your Access application As far as Word mailmerge is
concerned, it does not /really/ help, but it does then become possible to
insert the images during a Word 2002/2003 mailmerge by using ADO code in a
Mailmerge event handler.

Peter Jamieson
 
S

SmogerP

In my Access table I created a text field called Signature, Text (250). In
the text field I put the value of "c:\\Claims
Processing\\App\\scantest2.bmp". In my word document I put: { INCLUDEPICTURE
«Signature» } and when the mail merge was generated, I get the following:
{ INCLUDEPICTURE c:\\Claims Processing\\App\\scantest2.bmp } This is the
right location for the bitmap, but it is not appearing in the document. Any
suggestions? What am I not seeing?

Thanks,

Phill
 
P

Peter Jamieson

Are the {} surroung the INCLUEPICTURE the special field braces you can
insert using ctrl-F9?

Ensure that Tools|Options|Print|Update fields and Update Links are checked.

If you are merging to a new document, you may also have to select the
document (e.g. ctrl-A) and press F9 to update all the fields.

Peter Jamieson
 
S

SmogerP

They were not the {} from the ctrl-F9, but are now. Here is code:
{ INCLUDEPICTURE "c:\Claims ProcessingApp\scantest2.bmp" }
I am able to toggle the field codes, so I am assuming is it accurate. The
"c:\..." is where the bitmap is stored. When I close out and run the mail
merge process, all I get is an empty picture with the little red "x" at top
left. I then did a "Select All" and an "F9" and nothing happened.

I checked the Tools/Options/... the two boxes you mention are now checked.
Still get the same thing.
 
P

Peter Jamieson

{ INCLUDEPICTURE "c:\Claims ProcessingApp\scantest2.bmp" }

The backslashes in this need to be doubled up - they were like that in your
previous message!
{ INCLUDEPICTURE "c:\\Claims ProcessingApp\\scantest2.bmp" }

Peter Jamieson
 
S

SmogerP

Changed the code back. Here it is:
{ INCLUDEPICTURE "c:\\Claims Processing\\App\\scantest2.bmp" }
Still have the same issue of the picture showing up with the red "x". When
mail/merged the document, nothing appears. Do the Ctl-A, F9 and the picture
frame comes up and that is it. Could there be something with the image?
When I open the image in Paint, it all looks fine.

Thanks for your support.

Phill
 
P

Peter Jamieson

If you create a new Word document, go to Insert|Picture|From File..., then
select scantest2.bmp and use the Insert button, Insert and Link option to
insert an INCLUDEPICTURE field. That should tell you whether or not Word is
importing the picture correctly. Your path will probably be inserted
differently, using relative addressing, forwarrdlashes, and "%20" instead of
spaces, but see if you can see any differences between the path you have
used and the one you just inserted (I sometimes fail to notice a space at
the beginning or end).

Peter Jamieson
 
S

SmogerP

You had me up to the part of Inserting the picture into a new Word document.
Did that. Not sure what you meant by "Insert and Link option to insert an
INCLUDEPICTURE field" from there.

I attached to my datasource and inserted the Signature field. The field
code is { {MERGEFIELD Signature }{ {INCLUDEPICTURE "C:\\Claims
Processing\\Apps\\scantest2.bmp" \* MERGFORMAT }} }
spacing seems to be accurate. There was no relative addressing. From prior
reply's , do I need the {MERGEFIELD ... part of this? Is there a way to
copy/paste the code from WORD right in this reply?
 
P

Peter Jamieson

When you insert the picture, typically you would click on the Insert button
in the bottom right of the dialog box. But there'sa drop-down arrow at the
right-hand end of the button. Click that, and you should see the Insert and
Link option. Click that. An INSERTPICTURE field should be inserted. If you
don't see the picture, use Alt-F9 to switch from "field code" view to "field
result" view.
From prior
reply's , do I need the {MERGEFIELD ... part of this?

You need the MERGEFIELD nested inside the INCLUDEPICTURE if you wt a
different picture for each data source record.
Is there a way to
copy/paste the code from WORD right in this reply?

I can e-mail you a nested INCLUDEPICTURE that works on my system, but that's
the problem - I can't guarantee that it will work on yours.

Peter Jamieson
 

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