CreatePoll method

Adds a Poll to a Topic.

Syntax


C++
HRESULT CreatePoll (
   BSTR Name,
   BSTR Question,
   ERUTextFormat QuestionFormat,
   VARIANT Choices,
   LONG CreateOptions,
   IERUItem** ppPoll,)
Scripting languages
Set Poll = Object.CreatePoll (
   Name as String,
   Question as String,
   QuestionFormat as ERUTextFormat,
   Choices as VARIANT,
   CreateOptions as Long)

Parameters


Name

The title of the new Poll.

Question

The question you want users to vote on.

QuestionFormat

Indicates whether the Question parameter is in HTML or plain text format.

For further information, see ERUTextFormat.

Choices

Contains a SAFEARRAY of BSTRs listing the choices for the question. There must be at least two choices.

CreateOptions

One or more values from the ERUCreateOptions enumeration, logically OR'ed together [optional, default = erCreateOptNone] Legal values include:

  • erCreateOptAllowWriteIn

  • erCreateOptAllowMultipleVotes

  • erCreateOptShowVotes

ppPoll

Upon return, an IERUItem interface pointer to the newly-created poll.

Return value


C++

The return code.

Scripting languages

An IERUItem interface pointer to the newly-created poll.

Remarks


You cannot create a poll on an eRoom's Home page or in the embedded topic of a Poll Page.

Home

Interface

IERUTopic


See also

Creating Items