Re: [python-win32] saving an ole control object embedded in a powerpoint
by Mark Hammond other posts by this author
Feb 20 2006 2:47PM messages near this date
[python-win32] saving an ole control object embedded in a powerpoint
|
[python-win32] Excel Application
> The problem is that I don't know how to obtain something that would be
> accepted as an IStream (through python/com machinery) and that would
> write everything to a file or in a string, and that I can read later.
Look at the win32com.server.util FileStream class. Usage would be something
like:
from win32com.server.util import wrap, FileStream
f = open(filename, "wb")
fs = FileStream(f)
# Turn it into a "real" COM object.
fs = wrap(fs)
# Pass it to COM
pythoncom.OleSaveToStream(persist, fs)
Untested, but that is the idea.
Mark
_______________________________________________
Python-win32 mailing list
Python-win32@[...].org
http://mail.python.org/mailman/listinfo/python-win32
Thread:
Bertrand Mathieu
Mark Hammond
|