|
-
Aug 8th, 2010, 08:07 PM
#1
Thread Starter
Addicted Member
write into excel
i have code below capturing sendername and date sent to excel with specific subject
but i will also need to capturing received time against the sendername in excel
please help me in the below code.
thanks for your great help,
Code:
i = Sheets("Sheet1").Range("A65536").End(xlUp).Row + 1
For Each olMail In Fldr.Items
For Each olMail In Fldr.Items
MyArray = Trim(Split(olMail.Subject, "-")(0))
If olMail.SenderName = "xxx" Or olMail.SenderName = "xxxx" Or olMail.SenderName = "xxxxx" Then
If MyArray = "Password Permit" Then
ActiveSheet.Cells(i, 1).Value = olMail.To
ActiveSheet.Cells(i, 2).Value = olMail.SentOn
i = i + 1
End If
End If
Next olMail
Set Fldr = Nothing
Set olNs = Nothing
Set olApp = Nothing
Application.ScreenUpdating = True
-
Aug 9th, 2010, 04:48 AM
#2
Re: write into excel
but i will also need to capturing received time against the sendername in excel
But I answered this question on 21st Jul 2010 
http://www.vbforums.com/showpost.php...6&postcount=10
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 9th, 2010, 06:55 AM
#3
Thread Starter
Addicted Member
Re: write into excel
Kool
i tried it . but i could not get received time against the sendername in excel
captured received time in differrent row not the same row which senndername is ? could you help me
-
Aug 9th, 2010, 07:07 AM
#4
Re: write into excel
Show the code that you are using for received time.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 9th, 2010, 07:23 AM
#5
Thread Starter
Addicted Member
Re: write into excel
this is the code for received time
Last edited by kamakshi; Aug 10th, 2010 at 08:09 PM.
-
Aug 9th, 2010, 07:35 AM
#6
Re: write into excel
kamakshi: The code is correct...
Can you show me the complete code so that I can test it at my end?
Also
For Each olMail In Fldr.Items
is mentioned twice in post#1. Is it a typo?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 9th, 2010, 07:50 AM
#7
Thread Starter
Addicted Member
Last edited by kamakshi; Aug 10th, 2010 at 08:09 PM.
-
Aug 9th, 2010, 08:46 AM
#8
Re: write into excel
kamakshi, I feel that you have just copied and pasted that code in your Application from a different source. No offense meant but do you actually understand what the code is doing?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 9th, 2010, 11:16 AM
#9
Thread Starter
Addicted Member
Re: write into excel
kool
before this code it copied everyhtin senderanme and sent on in excel
but i need to compare sendername in excel against outlook adn copy the received time the exact column
for example fir the row 15 i havesender name the macro corresponding row columnn 3 will be paste received time from outlook
the below code i added it does not go in
Last edited by kamakshi; Aug 10th, 2010 at 08:08 PM.
-
Aug 9th, 2010, 04:22 PM
#10
Thread Starter
Addicted Member
Re: write into excel
Hi!
from outlook to excel copied sendername and date sent on
and thenk outlook received mail check with excel sendername and then copy received item in the excel
first one part is fine but second part it picksup from outlook but not in right row. Could anybody help me
Last edited by kamakshi; Aug 10th, 2010 at 08:08 PM.
-
Aug 9th, 2010, 06:20 PM
#11
Thread Starter
Addicted Member
Re: write into excel
Set c = .Find(olItem.SenderName, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=SearchOrder, SearchDirection:=SearchDirection, MatchCase:=False, SearchFormat:=False)
Last edited by kamakshi; Aug 10th, 2010 at 08:08 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|