Looping over recipients in a Outlook AppointmentsHow to export an Outlook calendar into an Excel weekly timesheet?How to add excel range as a picture to outlook message bodyExcel VBA - read cell value from codeCopy data from worksheet to html file to mailMethod of Range Object_Worksheet failed error in copying and pasting data from a worksheet to anotherAppointment Object was sentTrying to create personalized emails with multiple attachmentsVBA send email with template using the cell value as recipientsExcel VBA macro to send emails to unique users in rangeHow to retrieve Global address list using SASVBA Excel runtime error with Outlook GetNamespace(“MAPI”)

Different past tense for various *et words

Divide Numbers by 0

An alternative to "two column" geometry proofs

Can my UK debt be collected because I have to return to US?

extending lines in 3d graph

Visiting girlfriend in the USA

Replace a motion-sensor/timer with simple single pole switch

If the government illegally doesn't ask for article 50 extension, can parliament do it instead?

Fishing from underwater domes

How does the search space affect the speed of an ILP solver?

Is it rude to ask my opponent to resign an online game when they have a lost endgame?

Am I required to correct my opponent's assumptions about my morph creatures?

What is the maximal acceptable delay between pilot's input and flight control surface actuation?

What happens if you just start drawing from the Deck of Many Things without declaring any number of cards?

Does the telecom provider need physical access to the SIM card to clone it?

Using large parts of a research paper

Tiny image scraper for xkcd.com

Calculate Landau's function

What are the electrical characteristics of a PC gameport?

Heuristic argument for the Riemann Hypothesis

garage light with two hots and one neutral

Can a human variant take proficiency in initiative?

Why don't "echo -e" commands seem to produce the right output?

How to have the "Restore Missing Files" function from Nautilus without installing Nautilus?



Looping over recipients in a Outlook Appointments


How to export an Outlook calendar into an Excel weekly timesheet?How to add excel range as a picture to outlook message bodyExcel VBA - read cell value from codeCopy data from worksheet to html file to mailMethod of Range Object_Worksheet failed error in copying and pasting data from a worksheet to anotherAppointment Object was sentTrying to create personalized emails with multiple attachmentsVBA send email with template using the cell value as recipientsExcel VBA macro to send emails to unique users in rangeHow to retrieve Global address list using SASVBA Excel runtime error with Outlook GetNamespace(“MAPI”)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I using this code and trying to access the Recipients (Email Address and also Display Name) of each Outlook Appointment but getting a Error:




Run-time error '287' Application-defined or object-defined error




This error is highlighted on the line : For Each recip In olApt.recipients



Sub ListAppointments()
Dim olApp As Object
Dim olNS As Object
Dim olFolder As Object
Dim olApt As Object
Dim NextRow As Long
Dim FromDate As Date
Dim ToDate As Date

FromDate = CDate("01/04/2019")
ToDate = CDate("14/04/2019")

On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
If Err.Number > 0 Then Set olApp = CreateObject("Outlook.Application")
On Error GoTo 0

Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetDefaultFolder(9) 'olFolderCalendar
NextRow = 2

With Sheets("Sheet1") 'Change the name of the sheet here
.Range("A1:D1").Value = Array("Meeting", "Date", "Location", "Invitees")
For Each olApt In olFolder.Items
If (olApt.Start >= FromDate And olApt.Start <= ToDate) Then
.Cells(NextRow, "A").Value = olApt.Subject
.Cells(NextRow, "B").Value = CDate(olApt.Start)
.Cells(NextRow, "C").Value = olApt.Location
.Cells(NextRow, "D").Value = olApt.Categories

Dim recip As Object
Dim allRecip As String
For Each recip In olApt
Debug.Print (recip.Address)
.Cells(NextRow, "E").Value = olApt.Address
Next

NextRow = NextRow + 1
Else
End If
Next olApt
.Columns.AutoFit
End With

Set olApt = Nothing
Set olFolder = Nothing
Set olNS = Nothing
Set olApp = Nothing
End Sub


UPDATE



I tried



For Each recip in olApt.recipients
.Cells(NextRow, "E").Value = olApt.recipients.Address
Next


And I still get the errors below.



This is the error enter image description here



Here are two parts of the Watch on olApt



enter image description here



enter image description here



UPDATE 2



The answer works on my laptop but crashes on my desktop (seperate outlook account). This is the line it crashes on, and I not it wont let the "R" in recipients be a captial (it changes to lower case automatically despite typing a captial).



enter image description here



I also note that the Recipients collection on olApt is different on my laptop to my desktop:



enter image description here










share|improve this question


























  • Does this always happen wit ha particular appointment or only after processing a large number of appointments?

    – Dmitry Streblechenko
    Mar 28 at 2:51











  • This is the first Appointment in that date range.

    – Al Grant
    Mar 28 at 2:59











  • As guided by @DmitryStreblechenko Correct syntax and approach is to change to line .Cells(NextRow, "E").Value = recip.Address

    – skkakkar
    Mar 28 at 5:34











  • @DmitryStreblechenko may kindly put hisr answer guiding us about the mistake in line .Cells(NextRow, "E").Value = olApt.recipients.Address

    – skkakkar
    Mar 28 at 6:26











  • @DmitryStreblechenko why did you delete your answer?

    – Al Grant
    Mar 28 at 18:16

















0















I using this code and trying to access the Recipients (Email Address and also Display Name) of each Outlook Appointment but getting a Error:




Run-time error '287' Application-defined or object-defined error




This error is highlighted on the line : For Each recip In olApt.recipients



Sub ListAppointments()
Dim olApp As Object
Dim olNS As Object
Dim olFolder As Object
Dim olApt As Object
Dim NextRow As Long
Dim FromDate As Date
Dim ToDate As Date

FromDate = CDate("01/04/2019")
ToDate = CDate("14/04/2019")

On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
If Err.Number > 0 Then Set olApp = CreateObject("Outlook.Application")
On Error GoTo 0

Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetDefaultFolder(9) 'olFolderCalendar
NextRow = 2

With Sheets("Sheet1") 'Change the name of the sheet here
.Range("A1:D1").Value = Array("Meeting", "Date", "Location", "Invitees")
For Each olApt In olFolder.Items
If (olApt.Start >= FromDate And olApt.Start <= ToDate) Then
.Cells(NextRow, "A").Value = olApt.Subject
.Cells(NextRow, "B").Value = CDate(olApt.Start)
.Cells(NextRow, "C").Value = olApt.Location
.Cells(NextRow, "D").Value = olApt.Categories

Dim recip As Object
Dim allRecip As String
For Each recip In olApt
Debug.Print (recip.Address)
.Cells(NextRow, "E").Value = olApt.Address
Next

NextRow = NextRow + 1
Else
End If
Next olApt
.Columns.AutoFit
End With

Set olApt = Nothing
Set olFolder = Nothing
Set olNS = Nothing
Set olApp = Nothing
End Sub


UPDATE



I tried



For Each recip in olApt.recipients
.Cells(NextRow, "E").Value = olApt.recipients.Address
Next


And I still get the errors below.



This is the error enter image description here



Here are two parts of the Watch on olApt



enter image description here



enter image description here



UPDATE 2



The answer works on my laptop but crashes on my desktop (seperate outlook account). This is the line it crashes on, and I not it wont let the "R" in recipients be a captial (it changes to lower case automatically despite typing a captial).



enter image description here



I also note that the Recipients collection on olApt is different on my laptop to my desktop:



enter image description here










share|improve this question


























  • Does this always happen wit ha particular appointment or only after processing a large number of appointments?

    – Dmitry Streblechenko
    Mar 28 at 2:51











  • This is the first Appointment in that date range.

    – Al Grant
    Mar 28 at 2:59











  • As guided by @DmitryStreblechenko Correct syntax and approach is to change to line .Cells(NextRow, "E").Value = recip.Address

    – skkakkar
    Mar 28 at 5:34











  • @DmitryStreblechenko may kindly put hisr answer guiding us about the mistake in line .Cells(NextRow, "E").Value = olApt.recipients.Address

    – skkakkar
    Mar 28 at 6:26











  • @DmitryStreblechenko why did you delete your answer?

    – Al Grant
    Mar 28 at 18:16













0












0








0








I using this code and trying to access the Recipients (Email Address and also Display Name) of each Outlook Appointment but getting a Error:




Run-time error '287' Application-defined or object-defined error




This error is highlighted on the line : For Each recip In olApt.recipients



Sub ListAppointments()
Dim olApp As Object
Dim olNS As Object
Dim olFolder As Object
Dim olApt As Object
Dim NextRow As Long
Dim FromDate As Date
Dim ToDate As Date

FromDate = CDate("01/04/2019")
ToDate = CDate("14/04/2019")

On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
If Err.Number > 0 Then Set olApp = CreateObject("Outlook.Application")
On Error GoTo 0

Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetDefaultFolder(9) 'olFolderCalendar
NextRow = 2

With Sheets("Sheet1") 'Change the name of the sheet here
.Range("A1:D1").Value = Array("Meeting", "Date", "Location", "Invitees")
For Each olApt In olFolder.Items
If (olApt.Start >= FromDate And olApt.Start <= ToDate) Then
.Cells(NextRow, "A").Value = olApt.Subject
.Cells(NextRow, "B").Value = CDate(olApt.Start)
.Cells(NextRow, "C").Value = olApt.Location
.Cells(NextRow, "D").Value = olApt.Categories

Dim recip As Object
Dim allRecip As String
For Each recip In olApt
Debug.Print (recip.Address)
.Cells(NextRow, "E").Value = olApt.Address
Next

NextRow = NextRow + 1
Else
End If
Next olApt
.Columns.AutoFit
End With

Set olApt = Nothing
Set olFolder = Nothing
Set olNS = Nothing
Set olApp = Nothing
End Sub


UPDATE



I tried



For Each recip in olApt.recipients
.Cells(NextRow, "E").Value = olApt.recipients.Address
Next


And I still get the errors below.



This is the error enter image description here



Here are two parts of the Watch on olApt



enter image description here



enter image description here



UPDATE 2



The answer works on my laptop but crashes on my desktop (seperate outlook account). This is the line it crashes on, and I not it wont let the "R" in recipients be a captial (it changes to lower case automatically despite typing a captial).



enter image description here



I also note that the Recipients collection on olApt is different on my laptop to my desktop:



enter image description here










share|improve this question
















I using this code and trying to access the Recipients (Email Address and also Display Name) of each Outlook Appointment but getting a Error:




Run-time error '287' Application-defined or object-defined error




This error is highlighted on the line : For Each recip In olApt.recipients



Sub ListAppointments()
Dim olApp As Object
Dim olNS As Object
Dim olFolder As Object
Dim olApt As Object
Dim NextRow As Long
Dim FromDate As Date
Dim ToDate As Date

FromDate = CDate("01/04/2019")
ToDate = CDate("14/04/2019")

On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
If Err.Number > 0 Then Set olApp = CreateObject("Outlook.Application")
On Error GoTo 0

Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetDefaultFolder(9) 'olFolderCalendar
NextRow = 2

With Sheets("Sheet1") 'Change the name of the sheet here
.Range("A1:D1").Value = Array("Meeting", "Date", "Location", "Invitees")
For Each olApt In olFolder.Items
If (olApt.Start >= FromDate And olApt.Start <= ToDate) Then
.Cells(NextRow, "A").Value = olApt.Subject
.Cells(NextRow, "B").Value = CDate(olApt.Start)
.Cells(NextRow, "C").Value = olApt.Location
.Cells(NextRow, "D").Value = olApt.Categories

Dim recip As Object
Dim allRecip As String
For Each recip In olApt
Debug.Print (recip.Address)
.Cells(NextRow, "E").Value = olApt.Address
Next

NextRow = NextRow + 1
Else
End If
Next olApt
.Columns.AutoFit
End With

Set olApt = Nothing
Set olFolder = Nothing
Set olNS = Nothing
Set olApp = Nothing
End Sub


UPDATE



I tried



For Each recip in olApt.recipients
.Cells(NextRow, "E").Value = olApt.recipients.Address
Next


And I still get the errors below.



This is the error enter image description here



Here are two parts of the Watch on olApt



enter image description here



enter image description here



UPDATE 2



The answer works on my laptop but crashes on my desktop (seperate outlook account). This is the line it crashes on, and I not it wont let the "R" in recipients be a captial (it changes to lower case automatically despite typing a captial).



enter image description here



I also note that the Recipients collection on olApt is different on my laptop to my desktop:



enter image description here







excel vba outlook






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 18:40







Al Grant

















asked Mar 28 at 1:03









Al GrantAl Grant

4854 silver badges19 bronze badges




4854 silver badges19 bronze badges















  • Does this always happen wit ha particular appointment or only after processing a large number of appointments?

    – Dmitry Streblechenko
    Mar 28 at 2:51











  • This is the first Appointment in that date range.

    – Al Grant
    Mar 28 at 2:59











  • As guided by @DmitryStreblechenko Correct syntax and approach is to change to line .Cells(NextRow, "E").Value = recip.Address

    – skkakkar
    Mar 28 at 5:34











  • @DmitryStreblechenko may kindly put hisr answer guiding us about the mistake in line .Cells(NextRow, "E").Value = olApt.recipients.Address

    – skkakkar
    Mar 28 at 6:26











  • @DmitryStreblechenko why did you delete your answer?

    – Al Grant
    Mar 28 at 18:16

















  • Does this always happen wit ha particular appointment or only after processing a large number of appointments?

    – Dmitry Streblechenko
    Mar 28 at 2:51











  • This is the first Appointment in that date range.

    – Al Grant
    Mar 28 at 2:59











  • As guided by @DmitryStreblechenko Correct syntax and approach is to change to line .Cells(NextRow, "E").Value = recip.Address

    – skkakkar
    Mar 28 at 5:34











  • @DmitryStreblechenko may kindly put hisr answer guiding us about the mistake in line .Cells(NextRow, "E").Value = olApt.recipients.Address

    – skkakkar
    Mar 28 at 6:26











  • @DmitryStreblechenko why did you delete your answer?

    – Al Grant
    Mar 28 at 18:16
















Does this always happen wit ha particular appointment or only after processing a large number of appointments?

– Dmitry Streblechenko
Mar 28 at 2:51





Does this always happen wit ha particular appointment or only after processing a large number of appointments?

– Dmitry Streblechenko
Mar 28 at 2:51













This is the first Appointment in that date range.

– Al Grant
Mar 28 at 2:59





This is the first Appointment in that date range.

– Al Grant
Mar 28 at 2:59













As guided by @DmitryStreblechenko Correct syntax and approach is to change to line .Cells(NextRow, "E").Value = recip.Address

– skkakkar
Mar 28 at 5:34





As guided by @DmitryStreblechenko Correct syntax and approach is to change to line .Cells(NextRow, "E").Value = recip.Address

– skkakkar
Mar 28 at 5:34













@DmitryStreblechenko may kindly put hisr answer guiding us about the mistake in line .Cells(NextRow, "E").Value = olApt.recipients.Address

– skkakkar
Mar 28 at 6:26





@DmitryStreblechenko may kindly put hisr answer guiding us about the mistake in line .Cells(NextRow, "E").Value = olApt.recipients.Address

– skkakkar
Mar 28 at 6:26













@DmitryStreblechenko why did you delete your answer?

– Al Grant
Mar 28 at 18:16





@DmitryStreblechenko why did you delete your answer?

– Al Grant
Mar 28 at 18:16












1 Answer
1






active

oldest

votes


















1















The line



Cells(NextRow, "E").Value = olApt.recipients.Address 


must be replaced with



.Cells(NextRow, "E").Value = recip.Address 


Also keep in mind that Outlook Security can blocks access to properties such as SenderEmailAddress or Recipients if an antivirus app is not installed or is out of date. See https://docs.microsoft.com/en-us/office/vba/outlook/how-to/security/security-behavior-of-the-outlook-object-model






share|improve this answer



























  • I thought it was .Cells(NextRow, "E").Value = recip.Address.Item(1)

    – Al Grant
    Mar 28 at 18:22











  • No. Address is a string property. It does not expose Item method. @skkakkar's (wrong) answer was to use "olApt.Recipients.Item(1)", but that always returns the first recipient (object, not a string). You already have the recipient object in the recip variable from the "for each" loop. And your loop really needs to use separate cells, the existing code keeps writing multiple values to the same cell.

    – Dmitry Streblechenko
    Mar 28 at 18:26











  • Thanks. The 287 error is still present on Desktop PC - see comment. The code is cut n paste the same.

    – Al Grant
    Mar 28 at 18:34











  • Oh wait, do you have an AV app on the problematic machine?

    – Dmitry Streblechenko
    Mar 28 at 19:51






  • 1





    Sure, see above.

    – Dmitry Streblechenko
    Mar 30 at 22:01










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388697%2flooping-over-recipients-in-a-outlook-appointments%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1















The line



Cells(NextRow, "E").Value = olApt.recipients.Address 


must be replaced with



.Cells(NextRow, "E").Value = recip.Address 


Also keep in mind that Outlook Security can blocks access to properties such as SenderEmailAddress or Recipients if an antivirus app is not installed or is out of date. See https://docs.microsoft.com/en-us/office/vba/outlook/how-to/security/security-behavior-of-the-outlook-object-model






share|improve this answer



























  • I thought it was .Cells(NextRow, "E").Value = recip.Address.Item(1)

    – Al Grant
    Mar 28 at 18:22











  • No. Address is a string property. It does not expose Item method. @skkakkar's (wrong) answer was to use "olApt.Recipients.Item(1)", but that always returns the first recipient (object, not a string). You already have the recipient object in the recip variable from the "for each" loop. And your loop really needs to use separate cells, the existing code keeps writing multiple values to the same cell.

    – Dmitry Streblechenko
    Mar 28 at 18:26











  • Thanks. The 287 error is still present on Desktop PC - see comment. The code is cut n paste the same.

    – Al Grant
    Mar 28 at 18:34











  • Oh wait, do you have an AV app on the problematic machine?

    – Dmitry Streblechenko
    Mar 28 at 19:51






  • 1





    Sure, see above.

    – Dmitry Streblechenko
    Mar 30 at 22:01















1















The line



Cells(NextRow, "E").Value = olApt.recipients.Address 


must be replaced with



.Cells(NextRow, "E").Value = recip.Address 


Also keep in mind that Outlook Security can blocks access to properties such as SenderEmailAddress or Recipients if an antivirus app is not installed or is out of date. See https://docs.microsoft.com/en-us/office/vba/outlook/how-to/security/security-behavior-of-the-outlook-object-model






share|improve this answer



























  • I thought it was .Cells(NextRow, "E").Value = recip.Address.Item(1)

    – Al Grant
    Mar 28 at 18:22











  • No. Address is a string property. It does not expose Item method. @skkakkar's (wrong) answer was to use "olApt.Recipients.Item(1)", but that always returns the first recipient (object, not a string). You already have the recipient object in the recip variable from the "for each" loop. And your loop really needs to use separate cells, the existing code keeps writing multiple values to the same cell.

    – Dmitry Streblechenko
    Mar 28 at 18:26











  • Thanks. The 287 error is still present on Desktop PC - see comment. The code is cut n paste the same.

    – Al Grant
    Mar 28 at 18:34











  • Oh wait, do you have an AV app on the problematic machine?

    – Dmitry Streblechenko
    Mar 28 at 19:51






  • 1





    Sure, see above.

    – Dmitry Streblechenko
    Mar 30 at 22:01













1














1










1









The line



Cells(NextRow, "E").Value = olApt.recipients.Address 


must be replaced with



.Cells(NextRow, "E").Value = recip.Address 


Also keep in mind that Outlook Security can blocks access to properties such as SenderEmailAddress or Recipients if an antivirus app is not installed or is out of date. See https://docs.microsoft.com/en-us/office/vba/outlook/how-to/security/security-behavior-of-the-outlook-object-model






share|improve this answer















The line



Cells(NextRow, "E").Value = olApt.recipients.Address 


must be replaced with



.Cells(NextRow, "E").Value = recip.Address 


Also keep in mind that Outlook Security can blocks access to properties such as SenderEmailAddress or Recipients if an antivirus app is not installed or is out of date. See https://docs.microsoft.com/en-us/office/vba/outlook/how-to/security/security-behavior-of-the-outlook-object-model







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 30 at 22:01

























answered Mar 28 at 18:18









Dmitry StreblechenkoDmitry Streblechenko

47.4k3 gold badges33 silver badges64 bronze badges




47.4k3 gold badges33 silver badges64 bronze badges















  • I thought it was .Cells(NextRow, "E").Value = recip.Address.Item(1)

    – Al Grant
    Mar 28 at 18:22











  • No. Address is a string property. It does not expose Item method. @skkakkar's (wrong) answer was to use "olApt.Recipients.Item(1)", but that always returns the first recipient (object, not a string). You already have the recipient object in the recip variable from the "for each" loop. And your loop really needs to use separate cells, the existing code keeps writing multiple values to the same cell.

    – Dmitry Streblechenko
    Mar 28 at 18:26











  • Thanks. The 287 error is still present on Desktop PC - see comment. The code is cut n paste the same.

    – Al Grant
    Mar 28 at 18:34











  • Oh wait, do you have an AV app on the problematic machine?

    – Dmitry Streblechenko
    Mar 28 at 19:51






  • 1





    Sure, see above.

    – Dmitry Streblechenko
    Mar 30 at 22:01

















  • I thought it was .Cells(NextRow, "E").Value = recip.Address.Item(1)

    – Al Grant
    Mar 28 at 18:22











  • No. Address is a string property. It does not expose Item method. @skkakkar's (wrong) answer was to use "olApt.Recipients.Item(1)", but that always returns the first recipient (object, not a string). You already have the recipient object in the recip variable from the "for each" loop. And your loop really needs to use separate cells, the existing code keeps writing multiple values to the same cell.

    – Dmitry Streblechenko
    Mar 28 at 18:26











  • Thanks. The 287 error is still present on Desktop PC - see comment. The code is cut n paste the same.

    – Al Grant
    Mar 28 at 18:34











  • Oh wait, do you have an AV app on the problematic machine?

    – Dmitry Streblechenko
    Mar 28 at 19:51






  • 1





    Sure, see above.

    – Dmitry Streblechenko
    Mar 30 at 22:01
















I thought it was .Cells(NextRow, "E").Value = recip.Address.Item(1)

– Al Grant
Mar 28 at 18:22





I thought it was .Cells(NextRow, "E").Value = recip.Address.Item(1)

– Al Grant
Mar 28 at 18:22













No. Address is a string property. It does not expose Item method. @skkakkar's (wrong) answer was to use "olApt.Recipients.Item(1)", but that always returns the first recipient (object, not a string). You already have the recipient object in the recip variable from the "for each" loop. And your loop really needs to use separate cells, the existing code keeps writing multiple values to the same cell.

– Dmitry Streblechenko
Mar 28 at 18:26





No. Address is a string property. It does not expose Item method. @skkakkar's (wrong) answer was to use "olApt.Recipients.Item(1)", but that always returns the first recipient (object, not a string). You already have the recipient object in the recip variable from the "for each" loop. And your loop really needs to use separate cells, the existing code keeps writing multiple values to the same cell.

– Dmitry Streblechenko
Mar 28 at 18:26













Thanks. The 287 error is still present on Desktop PC - see comment. The code is cut n paste the same.

– Al Grant
Mar 28 at 18:34





Thanks. The 287 error is still present on Desktop PC - see comment. The code is cut n paste the same.

– Al Grant
Mar 28 at 18:34













Oh wait, do you have an AV app on the problematic machine?

– Dmitry Streblechenko
Mar 28 at 19:51





Oh wait, do you have an AV app on the problematic machine?

– Dmitry Streblechenko
Mar 28 at 19:51




1




1





Sure, see above.

– Dmitry Streblechenko
Mar 30 at 22:01





Sure, see above.

– Dmitry Streblechenko
Mar 30 at 22:01








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388697%2flooping-over-recipients-in-a-outlook-appointments%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현