Matches the formatting of the pasted text to the formatting of surrounding text. WdFormatSurroundingFormattingWithEmphasis Preserves original formatting of the pasted material. Pastes an Excel chart and links it to the original Excel spreadsheet. Pastes a Microsoft Excel chart as an embedded OLE object. Pastes an appended table without merging table styles. Merges pasted cells into an existing table by inserting the pasted rows between the selected rows. Inserts a pasted table as rows between two rows in the target table. Pastes a single cell table as a separate table.Ĭontinues numbering of a pasted list from the list in the document. wdFormatOriginalFormatting and wdFormatPlainText are the most frequently used paste formats that would cover most situations, however you can use other paste formats. The following is a list of the PasteAndFormat options available to use. ObjSel.PasteAndFormat (wdFormatOriginalFormatting) To remove the formatting, use wdFormatPlainText.ĭim olCal: Set olCal = Application.CreateItem(1) This sample code creates an appointment form with the clipboard contents pasted in the appointment body. You will need to set a reference to the Word Object Model in the VB editor's Tools, References menu.
0 Comments
Leave a Reply. |