View.GoToDate(DateTime) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在のビューで情報の表示に使用される日付を変更します。
public:
void GoToDate(DateTime Date);
public void GoToDate (DateTime Date);
Public Sub GoToDate (Date As DateTime)
パラメーター
- Date
- DateTime
ビューで変更する日付を指定します。
注釈
オブジェクトなどCalendarView、現在のビューで移動する日付を指定するには、最初に ではなく を使用CurrentViewCurrentViewして、現在のビューのオブジェクトを取得Viewする必要があります。 次のコード サンプルは、このアクションを実行する方法を示しています。
Sub TestGoToDate()
Dim oCV As Outlook.CalendarView
Dim oExpl As Outlook.Explorer
Dim datGoTo As Date
datGoTo = "11/7/2005"
' Display the contents of the Calendar default folder.
oExpl = Application.Explorers.Add( _
Application.Session.GetDefaultFolder( -
Outlook.OlDefaultFolders.olFolderCalendar), _
Outlook.OlFolderDisplayMode.olFolderDisplayFolderOnly)
oExpl.Display()
' Retrieve the current view by calling the
' CurrentView property of the Explorer object.
oCV = oExpl.CurrentView
' Set the CalendarViewMode property of the
' current view to display items by day.
oCV.CalendarViewMode = Outlook.OlCalendarViewMode.olCalendarViewDay
' Call the GoToDate method to set the date
' for which information is displayed in the view.
oCV.GoToDate(datGoTo)
End Sub
private void TestGoToDate()
{
Outlook.CalendarView oCV;
Outlook.Explorer oExpl;
System.DateTime datGoTo;
datGoTo = DateTime.Parse("11/7/2005");
// Display the contents of the Calendar default folder.
oExpl = Application.Explorers.Add(
Application.Session.GetDefaultFolder(
Outlook.OlDefaultFolders.olFolderCalendar),
Outlook.OlFolderDisplayMode.olFolderDisplayFolderOnly);
oExpl.Display();
// Retrieve the current view by calling the
// CurrentView property of the Explorer object.
oCV = (Outlook.CalendarView)(oExpl.CurrentView);
// Set the CalendarViewMode property of the
// current view to display items by day.
oCV.CalendarViewMode =
Outlook.OlCalendarViewMode.olCalendarViewDay;
// Call the GoToDate method to set the date
// for which information is displayed in the view.
oCV.GoToDate(datGoTo);
}
適用対象
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示