Insert File via Drop Down Option

G

Guest

Using Word 2002. Does anyone know how to create a drop down field that
presents the user/reader with a file open dialog box so they can choose a
file from thier local drive to insert into the current Word document? I am
creating a request form that contains a series of text form fields. As part
of this request form, the requestor has to have a statement of work to
include with the request. I thought it would be best to include the SOW,
which is a sepearte file of any type, DOC, LWP, TXT, etc, as part of the
request Word document. But, I don't know how to create a drop down menu that
allows the requestor to find and select the SOW file to insert into the
request Word document. Thanks in advance. Scott....
 
J

Jay Freedman

Hi Scott,

Your plan won't work in the way you propose. Because the document must
be protected in order for the form fields to work, Word won't let you
insert a file into it. You'll need a macro that gets the name of the
file to insert, unprotects the document, inserts the selected file,
and reprotects the document.

Also, the file-selecting thing can't be a dropdown -- a dropdown form
field requires that you know ahead of time what entries to put on it.
What you need is to have the macro show the File > Open dialog. The
user browses and selects the file, and the macro catches the returned
path and filename to use in inserting the file.

The document needs to start out (from the template) with a bookmark or
other identifiable location where the file is to be inserted.

If you need help with the macro, post a complete description of your
form and how it should operate in the Word Programming newsgroup
(microsoft.public.word.vba.beginners).

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

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