Thread View: pl.comp.lang.vbasic
1 messages
1 total messages
Started by Przemolo
Tue, 23 Feb 2010 11:46
Jak wkleić do Worda Richtext?
Author: Przemolo
Date: Tue, 23 Feb 2010 11:46
Date: Tue, 23 Feb 2010 11:46
20 lines
1534 bytes
1534 bytes
Mam sobię pewien skrypt VBS, którym chciałbym otworzyć dokument MS Word
i wkleić do niego tekst w formacie RichText:
set word=createobject("Word.Application")
word.documents.add
Set selection=word.selection
rtf=... pobieram dane skądś tam - zapisane w formacie RichText (RTF)
selection.typetext rtf
word.Visible=true
Niestety Word otwiera się i ma wpisany tekst tak jak mu podaje zmienna
rtf - np.:
{\rtf1\ansi\ansicpg1250\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset238
Calibri;}{\f1\fnil\fcharset238 Tahoma;}}
{\*\generator Riched20 12.0.6413.1000;}\viewkind4\uc1
\pard\b\f0\fs22\lang1045 tekst RTF\b0\f1\fs16
\par }
Czy Word ma możliwość sparsowania sobie tego na sam sformatowany tekst
bez żadnych RTFowych znaczników?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads