Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

BC30002: Type 'Microsoft.Office.Interop.Outlook.Application' is not defined

Options
  • 31-05-2006 10:58am
    #1
    Closed Accounts Posts: 17


    From Visusl Web Developer 2005 Express, he application runs fine with approriate reference added.
    But once I deploy the application to the web server I get " BC30002: Type 'Microsoft.Office.Interop.Outlook.Application' is not defined"

    Any help would be greatly appreciated!


Comments

  • Registered Users Posts: 683 ✭✭✭Gosh


    Can you post code?


  • Registered Users Posts: 1,456 ✭✭✭FSL


    If when you deployed the application you didn't include the dll the 'reference' referred to and any dependancies and the Web Server had not already got them all installed then the apllication would fail.


  • Closed Accounts Posts: 17 EthanCleary


    This is the code I have worked on so far. Its working fine on my localhost!I have tried to drop the required .dll's into my VSstudio 8 bin directory on my server but there is none!

    Seriuosly scratching my head here

    <%@ Page Language="VB" Debug ="true"%>
    <%@ Import Namespace="System.Reflection" %>
    .
    .
    .
    .
    Dim objOExp As Microsoft.Office.Interop.Outlook._Application
    Dim objAppt As Microsoft.Office.Interop.Outlook.AppointmentItem
    Const olAppointmentItem = 1
    Const olMeeting = 1

    Dim StartDate As DateTime = DateTime.Parse(txtBdate.Text)
    Dim EndDate As DateTime = DateTime.Parse(txtEdate.Text)

    Dim StartTime As String = txtBtime.Text
    Dim EndTime As String = txtEtime.Text

    objOExp = CreateObject("Outlook.Application")
    objAppt = objOExp.CreateItem(olAppointmentItem)
    With objAppt
    .Subject = objMail.Subject
    .Start = StartDate + " " + txtBtime.Text
    .End = EndDate + " " + txtEtime.Text

    .Location = ddlLocation.SelectedValue
    .Subject = "New Event Requested"
    .Body = "A new event is scheduled for " & txtBdate.Text _
    & " Please Review"

    .ReminderSet = True
    .ReminderMinutesBeforeStart = 15
    ' make it a meeting request
    .MeetingStatus = olMeeting
    '.AllDayEvent = False
    .RequiredAttendees = "someone@email.com"
    .RequiredAttendees = cblStaff.SelectedValue
    .RequiredAttendees = txtEmail.Text


  • Registered Users Posts: 1,456 ✭✭✭FSL


    You can not just drop the dlls onto the server they probably need registering.

    e.g. on the server run the following command

    regsvr32 fullpath/name of the DLL

    It will then register if it is a self registering DLL. If it is not self registering then it is unlikely to require registration.


  • Registered Users Posts: 683 ✭✭✭Gosh


    Or create a bin folder in the root folder if it doesn't exist and drop it in there


  • Advertisement
  • Closed Accounts Posts: 17 EthanCleary


    Thanks people, but I forgot to update my assembly references in my .config file!!
    .
    .
    .
    <assemblies>
    <add assembly="Office, Version=11.0.0.0, Culture=neutral"/>
    <add assembly="Microsoft.Office.Interop.Outlook, Version=11.0.0.0, Culture=neutral"/>
    </assemblies>
    .
    .
    Its working fine now!

    Yet again, thanks for the help!!


Advertisement