Hi Marco,
> First problem is how to use "With Dialogs(wdDialogInsertPicture).Show"
> and store the path to the selected file in a variable?
Don't use "Show", use "Display". And test the return value this gives,
in order to find out whether the user cancelled:
With Dialogs(wdDialogInsertPicture)
If .Display <> 0 Then
sFileName = .Name
End if
End With
> Second is it possible to show a preview image of all the files from
> that folder.
I don't really have a good answer for this one. Later versions of Word
have a "thumbnails" view for the dialog box. The UserForms in Office
have an IMAGE control and you should be able to use that to show an
individual picture (like if you load a list box with all the files from
the folder, then click on one at a time, code behind the form can load
that into the image control). Does that sound like what you're
interested in?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)