CreatePollPage method

Creates a Poll Page object.

Syntax


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

Parameters


Name

The title of the new poll page. If the erCreateOptMakeNameUnique flag in the CreateOptions argument has not been set, the name must be unique in the container.

Question

The question you want users to vote on.

QuestionFormat

Determines 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 corresponding to 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:

  • erCreateOptMakeNameUnique

  • erCreateOptIncludeComments

  • erCreateOptIncludeAttachmentBox

  • erCreateOptAllowWriteIn

  • erCreateOptAllowMultipleVotes

The default display options for the poll are to show the votes cast and the vote totals to everyone.

ppPollPage

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

Return value


C++

The return code.

Scripting languages

An IERUItem interface pointer to the newly-created poll page.

Remarks


The name of the poll page can be no longer than 126 characters.

Additional questions can be added to a Poll Page by obtaining its IERUPoll interface. The question used to create the Poll Page is represented by the first PollEntry object of the Poll associated with the Poll Page.

Home

Interface

IERUContainer


See also

Creating Items