Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
マクロを使用してワードドキュメントからxmlを作成しています。コピーしたテキストをワードドキュメントからxmlに貼り付けたいのですが、以下のコードを使用してテキストを選択しています。
Sub ShowSelection() Dim strText As String strText = Selection.Text End Sub
選択したテキストをxmlに貼り付けるにはどうすればよいですか?
Word マクロについてはわかりませんが、Word ドキュメントを文字列として読み取り、お気に入りの言語で XML として手動で解析してみませんか?