on 03-06-2006 12:11 PM
Hi all,
I try to integrate Outlook into my webapplication and I use the API from http://www.moyosoft.com. When I try to use their source code. I get the error Constructor Outlook() is undefined.
I used the sample "FindAppointment".
this is the source I use in my application:
imports
import com.moyosoft.connector.exception.*;
import com.moyosoft.connector.ms.outlook.*;
import com.moyosoft.connector.ms.outlook.appointment.*;
import com.moyosoft.connector.ms.outlook.folder.*;
import com.moyosoft.connector.ms.outlook.item.*;
Source wdDoInit:
public void wdDoInit()
{
//@@begin wdDoInit()
try
{
// Outlook application
Outlook outlookApplication = new Outlook();
// Get the default calendar folder
OutlookFolder folder =
outlookApplication.getDefaultFolder(FolderType.CALENDAR);
// Create the search filter.
// For more information on the filter format, read Microsoft documentation:
// http://support.microsoft.com/default.aspx?scid=kb;EN-US;201081
String filter =
"[Start] > '01/08/2004 11:59 PM' AND " +
"[Start] < '06/08/2004 12:00 AM'";
ItemsIterator iterator = folder.getItems().findItems(filter);
// Display info for all found appointments
while (iterator.hasNext())
{
OutlookItem item = iterator.nextItem();
// Check the item is an appointment
if (item != null && item.getType().isAppointment())
{
OutlookAppointment appointment = (OutlookAppointment) item;
//System.out.println("Subject: " + appointment.getSubject());
//System.out.println("Location: " + appointment.getLocation());
//System.out.println("Start: " + formatDateToString(appointment.getStart()));
// System.out.println("End: " + formatDateToString(appointment.getEnd()));
//System.out.println();
}
}
// Dispose the library
outlookApplication.dispose();
}
catch (ItemNotFoundException ex)
{
//System.out.println(
// "The default calendar folder hasn't been found: ");
ex.printStackTrace();
}
catch (ComponentObjectModelException ex)
{
//System.out.println("COM error has occured: ");
ex.printStackTrace();
}
catch (LibraryNotFoundException ex)
{
// If this error occurs, verify the file 'joutlookconnector.dll' is present
// in java.library.path
//System.out.println("The Java Outlook Library has not been found.");
ex.printStackTrace();
}
//@@end
}
Hi Richard,
May be you have some other class called Outlook? Try to specify full name: com.moyosoft.connector.ms.outlook.Outlook instead of just Outlook.
In documentation and in context of JAR file i can see Outlook with no prameters.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
This solved the problem, thanks for your help!
Richard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Richard,
i guess the constructor of the class Outlook has to provide with some Parameters. Take a look at the API docs for this class.
regards
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.