[OL2003] Always reply in text/plain

  • Thread starter Thread starter Boris 'pi' Piwinger
  • Start date Start date
B

Boris 'pi' Piwinger

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
 
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
 
Lars Roland said:
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
 
Lars Roland said:
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
 
Boris 'pi' Piwinger said:
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
 
Back
Top