View.GoToDate(DateTime) Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Cambia la fecha usada por la vista actual para mostrar información.
public:
void GoToDate(DateTime Date);
public void GoToDate (DateTime Date);
Public Sub GoToDate (Date As DateTime)
Parámetros
- Date
- DateTime
Fecha para la que debe cambiarse la vista.
Comentarios
Para especificar una fecha a la que ir en una vista actual, como un CalendarView objeto, primero debe obtener un View objeto para la vista actual mediante CurrentView en lugar de CurrentView. En el siguiente ejemplo de código se indica cómo hacerlo.
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);
}
Se aplica a
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente GitHub Issues como mecanismo de comentarios sobre el contenido y lo sustituiremos por un nuevo sistema de comentarios. Para más información, vea:Enviar y ver comentarios de