Re: Prevent attachments for being inserted into the body
From: Sue Mosher [MVP-Outlook] (suemvp_at_outlookcode.com)
Date: 02/01/05
- Next message: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Previous message: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- In reply to: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Next in thread: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Reply: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Feb 2005 10:33:30 -0500
And what's different? An HTML-format message always shows attachments in a
separate little attachment pane, not in the message body.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Hans Andersen" <hja@indu-flex.dk> wrote in message
news:%23%23f%23KIHCFHA.3096@TK2MSFTNGP14.phx.gbl...
> The message format is html.
> Deferent in the location at the attachment.
>
>>> That is not completely true.
>>> if you replace
>>> olMail.Attachments.Add HtmFile, olByValue
>>> with
>>> Dim s As String
>>> s = olMail.HTMLBody
>>> olMail.Attachments.Add HtmFile, olByValue
>>> the result will be deferent.
>>> Unfortunately it makes Outlook go into panic security mode.
>>> It can also be done from the UI.
>>>
>>> I can not be the only one how wants separate the attachments from the
>>> body!?
>>>
>>> "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
>>> news:ehZAQaGCFHA.328@tk2msftngp13.phx.gbl...
>>>> The placement of the attachments depends on the message format. RTF
>>>> puts them inline. HTML and plain text don't.
>>
>>>>
>>>>
>>>> "Hans Andersen" <hja@indu-flex.dk> wrote in message
>>>> news:%23WlIgfDCFHA.1888@TK2MSFTNGP10.phx.gbl...
>>>>> Hi all,
>>>>>
>>>>> I am trying to attach a htm file to an email in outlook 2003 with vba,
>>>>> but the file is inserted into the body. How do I change that. Code
>>>>> below
>>>>>
>>>>> Hans
>>>>>
>>>>>
>>>>> Private Sub VedHaeftTilbud(HtmFile As String)
>>>>>
>>>>> Dim olApp As Outlook.Application
>>>>> Dim olMail As Outlook.MailItem
>>>>> Dim obj As Object
>>>>>
>>>>> Set olApp = New Outlook.Application
>>>>>
>>>>> Set obj = Me.GetCurrentItem()
>>>>> Set olMail = obj
>>>>>
>>>>> olMail.Attachments.Add HtmFile, olByValue
>>>>>
>>>>> Set olApp = Nothing
>>>>>
>>>>> End Sub
>>>>>
>>>>> Function GetCurrentItem() As Object
>>>>> Dim objApp As Outlook.Application
>>>>>
>>>>> Set objApp = CreateObject("Outlook.Application")
>>>>> On Error Resume Next
>>>>> Select Case TypeName(objApp.ActiveWindow)
>>>>> Case "Explorer"
>>>>> Set GetCurrentItem =
>>>>> objApp.ActiveExplorer.Selection.Item(1)
>>>>> Case "Inspector"
>>>>> Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
>>>>> Case Else
>>>>> ' anything else will result in an error, which is
>>>>> ' why we have the error handler above
>>>>> End Select
>>>>>
>>>>> Set objApp = Nothing
>>>>> End Function
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
- Next message: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Previous message: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- In reply to: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Next in thread: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Reply: Hans Andersen: "Re: Prevent attachments for being inserted into the body"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|