Quantcast
Channel: All OutlookCode.com content
Viewing all articles
Browse latest Browse all 871

insert text file into BODY of email not as attachment

$
0
0
Previously in Outlook 2003 we were able to use Word VBA to insertfiles into the body of an email. But this was because Outlook used Word as it's editor. Now 2010 doesn't allow this yet I would still like to be able to do this. The VBA i used previously was as follows: It is run from a form (this was controlled by a keyboard shortcut) Global Const varUSERTEXT As String = "w:\zzword97\usertext\" Sub UserText() frmUserText.Show End Sub Sub GeneralUsertextClauses() Dim strfilename As String 'Dim oDoc As Word.Document Dim wd As Word.Application Dim Doc As Word.Document Dim fDialog As FileDialog Dim vrtSelectedItem As Variant Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog .Title = "Select Text Segment File" .InitialFileName = varUSERTEXT .Filters.Add "Word Documents", "*.doc", 1 .AllowMultiSelect = False If .Show <> -1 Then MsgBox "cancelled by User", , "List Folder Contents" Exit Sub End If strfilename = .SelectedItems(1) End With Selection.InsertFile strfilename, Range:="", ConfirmConversions:=False, link:=False, attachment:=False End Sub Is there anyway to do this in Outlook 2010 it is so useful to us Many thanks for your help Jane

Viewing all articles
Browse latest Browse all 871

Trending Articles