Qwert0000
Technical User
- Oct 24, 2003
- 30
Howdy,
I have a bound OLE object on a form that holds a jpeg. I am able to inset a file into this form using the inset object menu browse ect.
I would like to add a cmd button that opens the file dialog and allows me to choose the file I want and inserts that file into the ole object.
I have managed to get the file dialog open but cant seem to find the write command to inset the selected file.
I have this code so far
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Employee Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "JPEGs", "*.jpg"
.FilterIndex = 2
.AllowMultiSelect = False
.InitialFileName = CurrentProject.path & "/Pics"
my ole object is OLEPicture
and i have been playing with Action acOLECreateEmbed
but I really have no clue what I'm doing.
Any help you would greatly appreciated. Thanks to all who contrubite to this site. I have learned so much just reading every ones posts.
I have a bound OLE object on a form that holds a jpeg. I am able to inset a file into this form using the inset object menu browse ect.
I would like to add a cmd button that opens the file dialog and allows me to choose the file I want and inserts that file into the ole object.
I have managed to get the file dialog open but cant seem to find the write command to inset the selected file.
I have this code so far
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Employee Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "JPEGs", "*.jpg"
.FilterIndex = 2
.AllowMultiSelect = False
.InitialFileName = CurrentProject.path & "/Pics"
my ole object is OLEPicture
and i have been playing with Action acOLECreateEmbed
but I really have no clue what I'm doing.
Any help you would greatly appreciated. Thanks to all who contrubite to this site. I have learned so much just reading every ones posts.