PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
[OL2003] Always reply in text/plain
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
[OL2003] Always reply in text/plain
![]() |
[OL2003] Always reply in text/plain |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi!
It seems to be impossible to force OL2003 to reply in acceptable format, i.e., text/plain. So I was looking around for solutions and found: http://www.outlookcode.com/codedetail.aspx?id=198 Now that has the major flaw that it changes the format of the incoming message. My idea was to modify this, so that it would open the message in question, modify only that version of the message (later closing it without saving the changes) and reply to that one which would be text/plain. My problem is that I don't know vba. I could get so far as to open the message in a new window. Once I would change that to text/plain this also affects the original message. How can I avoid this? TIA pi |
|
|
|
#2 |
|
Guest
Posts: n/a
|
There are many options, the easist (when you are new to VB) would be to
copy the, original text and build your reply from this copy - this is not a beautiful solution, but it is easy also remember not to refrence the text object you wil need a deep copy. If you are into more advanced options, then you can try som of the fields options using redemtion and cdo (CdoPR_BODY), that will get you there right away. regards Lars Roland On Thu, 5 Aug 2004, Boris 'pi' Piwinger wrote: > Hi! > > It seems to be impossible to force OL2003 to reply in > acceptable format, i.e., text/plain. So I was looking around > for solutions and found: > http://www.outlookcode.com/codedetail.aspx?id=198 > > Now that has the major flaw that it changes the format of > the incoming message. My idea was to modify this, so that it > would open the message in question, modify only that version > of the message (later closing it without saving the changes) > and reply to that one which would be text/plain. > > My problem is that I don't know vba. I could get so far as > to open the message in a new window. Once I would change > that to text/plain this also affects the original message. > How can I avoid this? TIA > > pi > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Lars Roland <roland@diku.dk> wrote:
>> It seems to be impossible to force OL2003 to reply in >> acceptable format, i.e., text/plain. So I was looking around >> for solutions and found: >> http://www.outlookcode.com/codedetail.aspx?id=198 >> >> Now that has the major flaw that it changes the format of >> the incoming message. My idea was to modify this, so that it >> would open the message in question, modify only that version >> of the message (later closing it without saving the changes) >> and reply to that one which would be text/plain. >> >> My problem is that I don't know vba. I could get so far as >> to open the message in a new window. Once I would change >> that to text/plain this also affects the original message. >> How can I avoid this? TIA > >There are many options, the easist (when you are new to VB) would be to >copy the, original text and build your reply from this copy - this is not >a beautiful solution, but it is easy also remember not to refrence the >text object you wil need a deep copy. Wouldn't this break references? >If you are into more advanced options, then you can try som of the fields >options using redemtion and cdo (CdoPR_BODY), that will get you there >right away. I'll have a look at it. pi |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Lars Roland <roland@diku.dk> wrote:
>There are many options, the easist (when you are new to VB) would be to >copy the, original text and build your reply from this copy - this is not >a beautiful solution, but it is easy also remember not to refrence the >text object you wil need a deep copy. > >If you are into more advanced options, then you can try som of the fields >options using redemtion and cdo (CdoPR_BODY), that will get you there >right away. I don't find how to use those. Let me show you what I thought to do. From the page I mentioned I took the macro to modify it: :Sub ReplyInPlain() : Dim objItem As Object : Dim objReply As MailItem : Set objItem = GetCurrentItem() Here I get the mail I want to reply to. I inserted: objItem.display This opens the message as intended. Now I want to modify only this new window (as it happens if it was in "richtext" and I manually change to plaintext). But I cannot work out how to do it: : If objItem.BodyFormat <> olFormatPlain Then : objItem.BodyFormat = olFormatPlain Clearly, this refers to the underlying object, but how can I access only the new open windos? : End If : Set objReply = objItem.Reply Again here I want to modify only the new version. : objReply.Display : Set objItem = Nothing : Set objReply = Nothing Also I am not really sure what the last two things do. Why do I need to set those to Nothing? :End Sub : :Function GetCurrentItem() As Object : Dim objApp As 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 : End Select : Set objApp = Nothing :End Function pi |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Boris 'pi' Piwinger <3.14@piology.org> wrote:
>Let me show you what I thought to do. From the page I >mentioned I took the macro to modify it: > >:Sub ReplyInPlain() >: Dim objItem As Object >: Dim objReply As MailItem >: Set objItem = GetCurrentItem() > >Here I get the mail I want to reply to. I inserted: >objItem.display >This opens the message as intended. Now I want to modify >only this new window (as it happens if it was in "richtext" >and I manually change to plaintext). But I cannot work out >how to do it: > >: If objItem.BodyFormat <> olFormatPlain Then >: objItem.BodyFormat = olFormatPlain > >Clearly, this refers to the underlying object, but how can I >access only the new open windos? I thought, that would have been easy. Really nobody to solve this? AFAICS I cannot record a macro which would make things easy:-( pi |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

