Re: RTF to RTF Compressed

From: Michael Tissington (michael_at_nospam.com)
Date: 11/25/04


Date: Thu, 25 Nov 2004 15:12:03 -0800

Thanks, this does seem to work provided I remember to call Commit on the
uncompressed stream after writing it (that's the bit I was missing).

-- 
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com
"Dan Mitchell" <djmitchella@yahoo.com> wrote in message 
news:Xns95ACA0D4A88Cdjmitchellayahoocom@207.46.248.16...
> "Michael Tissington" <michael@nospam.com> wrote in news:OuBRo7z0EHA.824
> @TK2MSFTNGP11.phx.gbl:
>> I have a stream containing RTF
>> How can I convert it to RTF Compressed ?
>
> WrapCompressedRTFStream(.., MAPI_MODIFY, ..) should do it; from the docs:
>
> "If the MAPI_MODIFY flag is passed in the ulFlags parameter, the
> lpCompressedRTFStream parameter must already be open for reading and
> writing. New, uncompressed RTF text should be written into the stream
> interface returned in lpUncompressedRTFStream. Because it is not possible
> to append the existing stream, the entire message text must be written. "
>
> It's a bit of a roundabout way to do it, but this is the way, as far as I
> can see. I don't know offhand if this'll work on streams that aren't
> connected to the body properties of a message, but at worst create a
> temporary message to do this stuff in, I guess.
>
> -- dan
> 


Relevant Pages

  • Re: BinaryWriter (or streams) slow performance
    ... Who says you're the only one writing to that stream? ... The stream has the Position right. ... and then seeking back up to fill in the block size which it ... writer buffer, it could seek back to it, modify it in memory, and there's ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Binary serialization
    ... DATA members from the class in question the method of writing each ... the base class where you collect the data in to a byte array which is ... then written to the stream by the base class. ...
    (microsoft.public.dotnet.general)
  • Re: Stream Question
    ... The server will receive the data once the Write operation has finished. ... if I have a stream and I am writing to ... stream, while the client is still writing, will the asynchron reader receive ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: long line truncated on vista 2048
    ... What is the exact content of the file you're writing? ... closing the stream? ... It's just one long line at this point in the data file, ... its one of many shorter lines. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Progress maximum value on XML serialisation
    ... which delegates calls to an underlying stream. ... The facade would convey how many bytes were written to the underlying stream ... I need to show the user the progress of writing to file using progress ... My doubt is how to set the value for progress bar, ...
    (microsoft.public.dotnet.languages.csharp)