Class Broadcast (Word VBA)
The class Broadcast represents a Windows Live Broadcast Service broadcast session. To use a Broadcast class variable it first needs to be instantiated, for example
Dim brd as Broadcast
Set brd = ActiveDocument.Broadcast
AddMeetingNotes
Adds shared meeting notes for the specified broadcast that are accessible to attendees who use either Microsoft OneNote 2013 rich client or web app.
If you fail to pass a string for either of the two parameters, the AddMeetingNotes method returns an Invalid Parameter error. If for any reason the method call fails, Word returns a generic broadcast error.
AddMeetingNotes (notesUrl, notesWacUrl)
Dim strnotesUrl As String: strnotesUrl =
Dim strnotesWacUrl As String: strnotesWacUrl =
ActiveDocument.Broadcast.AddMeetingNotes notesUrl:=strnotesUrl, notesWacUrl:=strnotesWacUrl
Arguments
The following arguments are required:
notesUrl (String) - Specifies the URL where the shared meeting notes are stored, for attendees using the Microsoft OneNote 2013 rich client.
notesWacUrl (String) - Specifies the URL where the shared meeting notes are stored, for attendees using the Microsoft OneNote 2013 web access client.
AttendeeUrl
If a broadcast is in progress, returns a String that represents the URL of the attendee link.
If a broadcast is not in progress, AttendeeUrl returns an empty string.
Dim strAttendeeUrl As String
strAttendeeUrl = ActiveDocument.Broadcast.AttendeeUrl
Capabilities
Returns a Long that represents the capabilities of the specified broadcast.
The Capabilities property can return the followingMSOBroadcastCapabilities values:
Dim lngCapabilities As Long
lngCapabilities = ActiveDocument.Broadcast.Capabilities
End
Ends the specified broadcast session.
Calling the End method terminates the broadcast session without displaying a confirmation prompt to the user. It also sets the value of the Broadcast.AttendeeURL property to an empty string. If the document is not being broadcast, the method returns run-time error 4702.
ActiveDocument.Broadcast.End
Pause
Pauses the specified broadcast.
If the specified broadcast is not in progress, Pause returns run-time error 4702.
ActiveDocument.Broadcast.Pause
PresenterServiceUrl
If a broadcast is in progress, returns a String that represents the URL of the presenter service hosting the broadcast.
If a broadcast is not in progress, PresenterServiceUrl returns an empty string.
Dim strPresenterServiceUrl As String
strPresenterServiceUrl = ActiveDocument.Broadcast.PresenterServiceUrl
Resume
Resumes the specified broadcast.
The Resume method returns an error (#4700) if the document is DRM protected, is already being broadcast (#4698), is not being broadcast at all (#4702), or has conflicting edits (is in merge mode, #4701).
ActiveDocument.Broadcast.Resume
SessionID
If a broadcast is in progress, returns a String that specifies the ID of the session.
If a broadcast is not in progress, SessionID returns an empty string.
Dim strSessionID As String
strSessionID = ActiveDocument.Broadcast.SessionID
Start
Initiates the specified broadcast session.
Calling the Start method sets up the server, authenticates the user, and uploads the presentation. If the value passed for serverUrl has invalid formatting, Start returns an Invalid Parameter error. Additionally, the method returns an error if the document is DRM protected, is already being broadcast, or has conflicting edits (is in merge mode).
Start (serverUrl)
serverUrl: The URL of the broadcast server.
Dim strserverUrl As String: strserverUrl =
ActiveDocument.Broadcast.Start serverUrl:=strserverUrl
State
Returns an MSOBroadcastState constant that describes the current broadcast state.
The State property can return one of the following three states:
Dim mbsState As Office.MsoBroadcastState
mbsState = ActiveDocument.Broadcast.State