Application.ViewCopy-Methode (Project)

Kopiert die aktuelle Ansicht.

Syntax

Ausdruck. ViewCopy( _Name_, _ApplyTo_ )

Ausdruck Ein Ausdruck, der ein Application-Objekt zurückgibt.

Parameter

Name Erforderlich/Optional Datentyp Beschreibung
Name Optional String Der Name der Kopie der Ansicht.
ApplyTo Optional Integer Gibt an, welcher Bereich einer geteilten Ansicht kopiert werden soll. Folgende Werte können verwendet werden:
:----- :-----
Wert Beschreibung
0 Primärer Bereich einer geteilten Ansicht (in der Regel der obere Bereich)
1 Sekundärer Bereich einer geteilten Ansicht (in der Regel der untere Bereich)
4 Aktiver Bereich
5 Primärer Bereich oder Zeitachse (wenn diese aktiv ist)

Rückgabewert

Boolean

Bemerkungen

Hinweis

In a combination view, the primary pane is the view that remains when a details or secondary pane is closed. Usually the primary pane is at the top; however, the Timeline is a secondary pane, but it displays at the top. For example, with the Resource Sheet view, clicking Details on the View tab on the Ribbon shows the secondary Resource Form pane on the bottom. Clicking Timeline closes the Resource Form at the bottom and opens the Timeline pane at the top.

Verwendung der ViewCopy -Methode ohne Argumente zeigt das Dialogfeld Ansicht speichern, in dem dem Benutzer ermöglicht, nennen Sie die Kopie der Ansicht.

Beispiel

If the current view includes the Timeline in the top pane and the Gantt Chart in the bottom pane, where the Gantt Chart is the active pane, the following statement copies the Timeline view. After you execute the statement, the drop-down list of views includes Copy of Timeline in the Custom section.

application.ViewCopy Name:="Copy of Timeline", ApplyTo:=1

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.