How to open the dialogue "Insert Picture" (menu Insert-Picture-FromFile) programmatically?

A

avkokin

Hello.
How to open the dialogue "Insert Picture" (menu Insert-Picture-From
File) programmatically without knowledge of the name of the file? I
need to select some file (but I can't know the name of a file before
than I can find and select it).
 
D

Doug Robbins - Word MVP

The following will display the dialog and put the path and filename of the
selected file into the str txtLargeLogoPath

With Dialogs(wdDialogInsertPicture)
If .Display Then
'Populate the txtLargeLogoPath control with the selected
filename
txtLargeLogoPath = WordBasic.FilenameInfo$(.Name, 1)
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Top