It is necessary to carry out insertion from delphi with formatting, wrote a macro in vba as a result of which the following line should be translated into delphi

Selection.PasteAndFormat (wdFormatPlainText) 

But I could not do it. How can this be done differently or convert this code?

  • MyWordApp.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(...) . The wdFormatPlainText = 22 wdFormatPlainText . But this is bad — to access ActiveXXX objects in MSOffice. - kami
  • If the reference library is connected, then it seems to be the way it should be. Unless you need to explicitly specify the object on which the required selection is located, such as xlWorksheet1.Selection.PasteAndFormat wdFormatPlainText - Akina

0