PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming [OL2003] Always reply in text/plain

Reply

[OL2003] Always reply in text/plain

 
Thread Tools Rate Thread
Old 05-08-2004, 07:17 AM   #1
Boris 'pi' Piwinger
Guest
 
Posts: n/a
Default [OL2003] Always reply in text/plain


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
  Reply With Quote
Old 05-08-2004, 11:00 AM   #2
Lars Roland
Guest
 
Posts: n/a
Default Re: [OL2003] Always reply in text/plain

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
>

  Reply With Quote
Old 07-08-2004, 02:11 PM   #3
Boris 'pi' Piwinger
Guest
 
Posts: n/a
Default Re: [OL2003] Always reply in text/plain

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
  Reply With Quote
Old 08-08-2004, 12:49 PM   #4
Boris 'pi' Piwinger
Guest
 
Posts: n/a
Default Re: [OL2003] Always reply in text/plain

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
  Reply With Quote
Old 14-08-2004, 05:37 PM   #5
Boris 'pi' Piwinger
Guest
 
Posts: n/a
Default Re: [OL2003] Always reply in text/plain

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
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off