Solved

using VB to enter values into a calander appoinment

Posted on 2011-02-18
2
263 Views
Last Modified: 2012-06-27
i wantt o enter some values into a calander appoinment using a macro,  i think i am missing something simple

i have this

    Dim SubjectName As String
    SubjectName = InputBox("Paste the subject of the ticket")
    AppointmentItem.Subject = SubjectName
0
Comment
Question by:jimcrint
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
jimcrint earned 0 total points
ID: 34931351
OK I got that bit working now I want a bit more,  I had already done this in an access form and didnt make the connection that the same system worked.

When i have the appoinment open the cursor is sitting on location I want it to sit at the start of the body (above my ticket reference)  i do this in access with gotocontrol and selstart but i cant do that here I dont think  

    Dim NewLen As Integer
    Dim myOlApp As Outlook.Application
    Dim myApptItem As Outlook.AppointmentItem
    Set myOlApp = New Outlook.Application
    Set myApptItem = myOlApp.CreateItem(olAppointmentItem)

    Dim SubjectName As String
    Dim TicketID As String
   
    TicketID = InputBox("Enter the ticket number")
    SubjectName = InputBox("Copy and Paste the subject of the ticket")

If Not IsNull(TicketID) Then
    myApptItem.Subject = SubjectName & ":  Ticket ID = " & TicketID
    myApptItem.Body = Chr(13) & Chr(13) & "[Ticket Notes ~ticRefId='" & TicketID & "']"
    myApptItem.Display (Modal)
End If
0
 
LVL 1

Author Closing Comment

by:jimcrint
ID: 35286869
I found out what I needed to do by experimentation
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now