Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Accessing the file system

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: April 20, 2025
Also available as a single HTML file

Onetastic Macro Documentation > Functions > Object Functions > GetFormattedObjectContent

GetFormattedObjectContent

Returns the contents of an object in either plain text or HTML format. This can be useful to put the content into clipboard using Clipboard_Set, or process it further. This function can return the content of the following types of objects: Outline Paragraph Table Cell Image Text.

Syntax

String GetFormattedObjectContent(
	Outline|Paragraph|Table|Cell|Image|Text object, 
	String format)

Parameters

Outline|Paragraph|Table|Cell|Image|Text object
The object to return the content of.
String format
The format of the content. Acceptable values are: html, plain.

Examples

// Put contents of an outline as HTML into clipboard $outline = GetCurrentPage().outlines[0] Clipboard_Set("html", GetFormattedObjectContent($outline, "html"))

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Clipboard Functions

Data Store Functions

Data Type Specific Functions

Date/Time Functions

Dialog Box Functions

File System Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions