Solved

using VB to enter values into a calander appoinment

Posted on 2011-02-18
2
253 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

12 Experts available now in Live!

Get 1:1 Help Now