Hello all,
So I'm trying to insert text from a file into an email with a macro, the macro needs to open the file view to a certain folder and insert text from whatever file is selected by the user. I've managed this in word with the following code
Sub INSERT_TEST()
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
'get the number of the button chosen
Dim FileChosen As Integer
fd.InitialFileName = "S:\Clause bank"
FileChosen = fd.Show
If FileChosen <> -1 Then
'didn't choose anything (clicked on CANCEL)
MsgBox "You chose cancel"
Else
'Insert the file contents
Documents.Open FileName:=fd.SelectedItems(1), ReadOnly:=True
End If
End Sub
Now this doesn't work at all in outlook, but it gives you an idea of what I'm trying to get out of the new macro for outlook. Not having much luck looking this up online, but will keep trying while awaiting a response on this.
Thanks