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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word : Embed File

Status
Not open for further replies.

Lemox

Programmer
Dec 13, 2003
67
GB
Hi,

I want to embed a file (displayed as an icon) into a Word Document (VB6).
I use the WordDocument.Shapes.AddOLEObject method.

My problems are :
-the file is never really embedded : it always acts as a Link to the file (even if I set the "Link" parameter to False explicitly)
-I can't position it at the current insertion point : the file always sticks to the top of the page.

I almost never work with Word so it's not easy to understand the options of the AddOLEObject method (Shapes, Anchor,...)

Can someone tell me how to do it right ?

Thanx in advance.
Lemox
 
You may do the job manually from within word while the macro recorder is running, and then take a look at the generated VBA code.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top