Import Excel Text into Outlook Calender

Status
Not open for further replies.

BryanG

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
Hello,

I am trying to Import data from Excel 2013 into Outlook 2013. I tried the Import function but it is too cumbersome. As I live in Germany the , and ; characters are reversed and I can't Change it in my regional settings at work due to a GPO of some kind so I have to save the .csv file as text and run a replace fucntion to change them around.

Once I have done this, I have to create a temp calendar because the calendar I need the data to go into is not local. After all this, I for some reason still only get about 30% of the data to Import. Strange.

So I Googled further of course, and found that there could be some VBA scripts that can use, but I'm a beginner with VBA which brings me here to ask for your help. I need to import the Subject, Body, Dates and Times of course. Attached is a screenshot of the data that needs to be imported in blue.

Thanks!
Bryan
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
This macro imports excel data to outlook Create Appointments Using Spreadsheet Data - it actually imports events to subfolder calendars but can be changed to import into any calendar in the profile.

to use 1 calendar change this line to point ot the correct calendar
Set CalFolder = olNs.GetDefaultFolder(olFolderCalendar)

and change subfolder in this line to calfolder.
Set olAppt = subFolder.Items.Add(olAppointmentItem)


Working with VBA and non-default Outlook Folders shows how to reference other calendars in the profile.

If you are unable to import directly into the correct calendar, an option instead of using a temp calendar is to add a unique category then move everything assigned to that category.
 

BryanG

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
The script isn't working for me. I get an error from the 1st line (User-Type not defined) I think it may have something to do with the commands in VB are in German. I don't know if I will be able to translate all the needed text, nor am I certain which text can stay as is. I've attached the error but don't know if that will be of any help. Also I am not sure which parts of the text to Change to fit my data, columns, rows etc. A real beginner here. Thank you for your patience!
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
that error is because you need to set a reference to outlook in excel's vba editor's tools, reference. (This is an excel macro, not an outlook macro)

the fields *should* be ok using the English words.
 

BryanG

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
The reference is now set to "Microsoft Outlook 15.0 Object Library", but I still get the error. I have since did a Little more searching and found the below script. It als is not working for me. Can you see any mistakes?


Sub createAppointments()

On Error Resume Next
Dim sheet As Worksheet, rngStart As Range, rngEnd As Range, cell As Range
Set objOL = CreateObject("Outlook.Application")
Set objCal = objOL.Session.GetDefaultFolder(9)
Set sheet = Worksheets(1)
Set rngStart = sheet.Range("A2")
Set rngEnd = rngStart.End(xlDown)
counter = 0
For Each cell In sheet.Range(rngStart, rngEnd)
Set olApp = objCal.Items.Add(1)
With olApp
strSubject = cell.Text
strTitel = cell.Offset(0, 1).Text
strDescription = cell.Offset(0, 2).Text
strStartDate = cell.Offset(0, 3).Value
strEndDate = cell.Offset(0, 4).Value
strStartTime = cell.Offset(0, 5).Value
strEndTime = cell.Offset(0, 6).Value
.Subject = strSubject
.ReminderSet = False
If strCategory <> "" Then
.Categories = strCategory
End If
If boolAllDay = True Then
.AllDayEvent = True
If IsDate(strStartDate) Then
.Start = DateValue(strStartDate)
.End = DateAdd("d", 1, DateValue(strStartDate))
.Save
counter = counter + 1

Else
MsgBox "Termin mit dem Betreff: '" & strSubject & "' in Zeile " & cell.Row & " hat ungültige oder fehlende Zeitangaben", vbExclamation

End If

Else

.AllDayEvent = False
If IsDate(strStartDate) And IsDate(strEndDate) And IsDate(strStartTime) And IsDate(strEndTime) Then
.Start = DateValue(strStartDate) & " " & TimeValue(strStartTime)
.End = DateValue(strEndDate) & " " & TimeValue(strEndTime)

.Save
counter = counter + 1

Else

MsgBox "Termin mit dem Betreff: '" & strSubject & "' in Zeile " & cell.Row & " hat ungültige oder fehlende Zeitangaben", vbExclamation

End If
End If

End With

Next
Set objOL = Nothing
MsgBox counter & " Termin(e) wurden erstellt!", vbInformation
End Sub
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
T Outlook Calendar 2016 import Excel Using Outlook 1
ogodt Change Default contact form and import from Excel 2010 Using Outlook 1
B Problem with import Excel BCM (Business Contact Manager) 1
K Excel Import Option: Need Help Updating Existing Records BCM (Business Contact Manager) 0
F import individual contact info from excel to outlook contacts or vice versa Using Outlook 2
N Import Contacts Excel CSV File into Outlook 2010 Using Outlook 2
N When I try to import a large CSV from Excel to an Outlook folder, the program crashes... Every time. Using Outlook 2
L Import contact updates from Excel Using Outlook 1
L Import/Export of Contacts from/to Excel does not import E-Mail addresses Using Outlook 2
L Outlook won't let me import data from Excel or CSV. Using Outlook 4
T Can't get Outlook to import contact information from Excel worksheet Using Outlook 1
M Import TXT or excel file to contact in Outlook Using Outlook 1
C How do you import email addresses from Excel to your Outlook Contacts list? Using Outlook 0
C How do you import email addresses from Excel into Outlook to a distribution list? Using Outlook 0
C Way to import contacts from Excel into BCM Contacts? BCM (Business Contact Manager) 1
I Outlook 365 - import/attach PST file that used POP3 Using Outlook.com accounts in Outlook 0
M Export-Import .pst file problems Using Outlook 2
N .pst archive from work will not open/import on Microsoft 365 Exchange Server Administration 0
L How to Import Exchange OST file into Outlook? Using Outlook 3
M PST import from Outlook 2007 to 2010 - Address Book contacts all in 1 group Using Outlook 4
Christopher M Import Exchange Server Administration 1
R PST->Outlook.com (Import vs Drag-n-Drop methods Using Outlook.com accounts in Outlook 2
DoctorJellybean Import accounts\files Using Outlook 1
S Import contacts to a shared mailbox Outlook VBA and Custom Forms 2
P Import Categories from Outlook 2003 Using Outlook 8
avant-guvnor Import csv problem Using Outlook 7
T Outlook 2016 CSV Translator Import Error Using Outlook 6
Rupert Dragwater How to import contact list Using Outlook 15
C Import Outlook 2016 contacts into to: field Using Outlook 1
P Import an .ics file to a specific calendar Using Outlook 4
L Need to import multiple Outlook files to Office 365 Account Using Outlook 4
R ost file import Using Outlook 2
I Import Office theme .thmx Using Outlook 4
Diane Poremsky Batch Import Photos into Outlook Contacts New Slipstick.com Articles 0
Diane Poremsky Can't import CSV or move Outlook items into EAS Accounts New Slipstick.com Articles 0
Diane Poremsky How to Import Appointments into a Group Calendar New Slipstick.com Articles 0
M How to Import YES/NO Checkboxes? BCM (Business Contact Manager) 0
J Converted .ost to .pst: Want to Import and Reconnect with IMAP Email Account Using Outlook 2
GregS Import from Outlook.com .ost to IMAP .pst? Using Outlook 3
Q Outlook 2016\365 export specific rules to import in another system Exchange Server Administration 1
Diane Poremsky Macro to Bulk Import Contacts and vCards into Outlook New Slipstick.com Articles 0
Diane Poremsky Import Images into the Active Directory New Slipstick.com Articles 0
M convert/import a customized record into the default "Account" record BCM (Business Contact Manager) 0
Diane Poremsky Macro to Bulk Import vCards into Outlook New Slipstick.com Articles 0
e_a_g_l_e_p_i question about saving my .pst so I can import it to my Outlook after I build a new system Using Outlook 10
V Import from Outlook 2013 ost file? Using Outlook 2
E Want to Import Outlook 2003 pst files to later version Using Outlook 6
A Does Outlook import Gmail Archive? Using Outlook 1
E PDF Import Using Outlook 1
bhogesh How to import .htm saved mail to outlook Using Outlook 3
Similar threads


















































Top