Click here to Skip to main content
15,902,938 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: vb 2017 : AI : Genetic Programming Pin
Arthur V. Ratz6-Sep-17 4:56
professionalArthur V. Ratz6-Sep-17 4:56 
GeneralRe: vb 2017 : AI : Genetic Programming Pin
bluatigro6-Sep-17 21:56
bluatigro6-Sep-17 21:56 
GeneralRe: vb 2017 : AI : Genetic Programming Pin
bluatigro7-Sep-17 1:21
bluatigro7-Sep-17 1:21 
GeneralRe: vb 2017 : AI : Genetic Programming Pin
Arthur V. Ratz7-Sep-17 3:15
professionalArthur V. Ratz7-Sep-17 3:15 
GeneralRe: vb 2017 : AI : Genetic Programming Pin
Arthur V. Ratz7-Sep-17 7:44
professionalArthur V. Ratz7-Sep-17 7:44 
GeneralRe: vb 2017 : AI : Genetic Programming Pin
bluatigro7-Sep-17 23:26
bluatigro7-Sep-17 23:26 
GeneralRe: vb 2017 : AI : Genetic Programming Pin
Arthur V. Ratz7-Sep-17 23:37
professionalArthur V. Ratz7-Sep-17 23:37 
QuestionImport Outlook calendar entries from Excel with VBscript? Pin
xs13x31-Aug-17 11:03
xs13x31-Aug-17 11:03 
<pre>Hi,

I am pretty new to VBscripts. I am trying to use a VBscript to copy calendar entries from an excel spreadsheet into an Outlook Calendar. I have found on forums this script below:

Dim objExcel, objWorkbook
Dim objOutlook, objNameSpace, objFolder, foundItems, objAppt
Dim i, j, strFilter

Const olFolderCalendar = 9

Set objExcel = CreateObject("Excel.Application")
objExcel.Application.DisplayAlerts = False
Set objWorkbook = objExcel.Workbooks.Open("C:\VBATest\Dates.xlsx")
objExcel.Application.Visible = False
'objExcel.ActiveWorkbook.Save'
Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
Set objFolder = objNameSpace.GetDefaultFolder(olFolderCalendar)

For i = 1 To 3
j = 1
While j > 0
strFilter = "[Start] >= 'objWorkbook.Worksheets(i).Cells(4,2)' AND [Start] <= 'objWorkbook.Worksheets(i).Cells(4,3)' AND [Subject = 'objWorkbook.Worksheets(i).Cells(6,j)'"
Set foundItems = objFolder.Items.Restrict(strFilter)
Set foundItems = objFolder.Items.Restrict(strFilter)
If foundItems.Count = 1 Then foundItems.Item.Delete
Set objAppt = objFolder.Items.Add
With objAppt
.Subject = "objWorkbook.Worsheets(i).Cells(6,j)"
.Body = "objWorkbook.Worsheets(i).Cells(6,j)"
.Start = "objWorkbook.Worsheets(i).Cells(7,j)"
.AllDayEvent = True
.ReminderMinutesBeforeStart = 1440
.Save
End With
Set j = j + 1
If objWorkbook.Worksheets(i).Cells(6, j) = "stop" Then Set j = 0
If objWorkbook.Worksheets(i).Cells(6, j) = "stop" Then j = 0
Wend
Next
objWorkbook.Close False
Set objExcel = Nothing
Set objWorkbook = Nothing
Set objOutlook = Nothing
Set objNameSpace = Nothing
Set objFolder = Nothing
Set objAppt = Nothing

but I get the below error:

Error on line 20: Cannot parse condition. Error at "[Subject = 'objWorkbook.Worksheets(i).Ce...".
Code 80020009.

Any ideas how I can resolve this?</pre>
SuggestionRe: Import Outlook calendar entries from Excel with VBscript? Pin
Ralf Meier31-Aug-17 20:47
mveRalf Meier31-Aug-17 20:47 
AnswerRe: Import Outlook calendar entries from Excel with VBscript? Pin
Chris Quinn31-Aug-17 22:20
Chris Quinn31-Aug-17 22:20 
AnswerRe: Import Outlook calendar entries from Excel with VBscript? Pin
Ralf Meier1-Sep-17 0:32
mveRalf Meier1-Sep-17 0:32 
AnswerRe: Import Outlook calendar entries from Excel with VBscript? Pin
Richard Deeming1-Sep-17 2:47
mveRichard Deeming1-Sep-17 2:47 
GeneralRe: Import Outlook calendar entries from Excel with VBscript? Pin
xs13x1-Sep-17 3:13
xs13x1-Sep-17 3:13 
GeneralRe: Import Outlook calendar entries from Excel with VBscript? Pin
Richard Deeming1-Sep-17 4:00
mveRichard Deeming1-Sep-17 4:00 
QuestionI need to load a JP2 into an ImageList. All info I've found is out of date. Pin
Member 1338764431-Aug-17 5:19
Member 1338764431-Aug-17 5:19 
QuestionMessage Removed Pin
30-Aug-17 17:49
compcanada201730-Aug-17 17:49 
QuestionOpenFileDialog - Specific Path Pin
purushotham.k929-Aug-17 6:00
purushotham.k929-Aug-17 6:00 
AnswerRe: OpenFileDialog - Specific Path Pin
A_Griffin29-Aug-17 8:07
A_Griffin29-Aug-17 8:07 
QuestionUsing Webclient.uploadfile files is never copied to website Pin
Member 1098357222-Aug-17 12:47
Member 1098357222-Aug-17 12:47 
Questionvb.net desktop app zoom feature Pin
dcof22-Aug-17 6:34
dcof22-Aug-17 6:34 
AnswerRe: vb.net desktop app zoom feature Pin
Eddy Vluggen22-Aug-17 8:15
professionalEddy Vluggen22-Aug-17 8:15 
GeneralRe: vb.net desktop app zoom feature Pin
dcof23-Aug-17 8:49
dcof23-Aug-17 8:49 
GeneralRe: vb.net desktop app zoom feature Pin
Eddy Vluggen23-Aug-17 9:57
professionalEddy Vluggen23-Aug-17 9:57 
SuggestionRe: vb.net desktop app zoom feature Pin
Richard MacCutchan23-Aug-17 21:17
mveRichard MacCutchan23-Aug-17 21:17 
QuestionHow to connect Excell 2017 to Oracle DB to get Data by using VBA code. Pin
hmanhha20-Aug-17 22:15
hmanhha20-Aug-17 22:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.