> > I am trying to find out how to insert a picture from a file into a macro. I
> > cannt find much in the help bar nor in literature nor in the five lessons on
> > how to write macros. So I am lost. I need to write a simple macro that insert
> > a picture from file (or fills an empty picture frame). How can I do this?
>
> (Page Object).Shapes.AddPicture?
> I tried two hours on this today but do get errors
>
[quoted text clipped - 3 lines]
>
> what is wrong with giving the path to the picture?
a) "page" is the name of the Page data type, and so is reserved and
cannot be used for a variable name.
b) You haven't ended your sub.
c) "Set" is used to assign an object to a variable. For example, if your
Page variable were called "aPage", then
Set aPage = ThisDocument.Pages(1)
would set aPage to be the first page of the current document, and
Set aPage = ThisDocument.ActiveView.ActivePage
would set aPage to be the active page.
d) "Set" is not used for executing methods. The AddPicture method is a
method, and so goes on a line of its own; unless you want to assign the
resulting shape to a new variable. For example
aPage.Shapes.AddPicture "e:\Picture1.jpg"
or
Dim aShape As Shape
Set aShape = aPage.Shapes.AddPicture("e:\Picture1.jpg")
(note that when the method comes after an assignment, the arguments are
bracketed; otherwise, they are not)

Signature
Ed Bennett - MVP Microsoft Publisher
http://ed.mvps.org