please customize this code

Status
Not open for further replies.

montu

Member
Outlook version
Outlook 2010 64 bit
Email Account
IMAP
Hi,

I am going to share my code here in which i need your help to achieve my goal. Here is my code and please see below, where dotted line are, here i want to export each item into excel sheet that we launched through code. please help me.
Dim objOL As Outlook.Application
Dim objNS As Outlook.namespace
Dim objExpCal As Outlook.Explorer
Dim objNavMod As Outlook.CalendarModule
Dim objNavGroup As Outlook.NavigationGroup
Dim objNavFolder As Outlook.NavigationFolder
Dim objFolder As Outlook.Folder

Dim oItems As Outlook.Items

Dim appExcel As Excel.Application
Dim wkb As Excel.Workbook
Dim wks As Excel.Worksheet
Dim rng As Excel.Range
Dim strSheet As String
Dim strPath As String
Dim intRowCounter As Integer
Dim intColumnCounter As Integer
strSheet = "OutlookItems.xls"
strPath = "C:\Examples\"
strSheet = strPath & strSheet
Debug.Print strSheet
Set appExcel = CreateObject("Excel.Application")
appExcel.Workbooks.Open (strSheet)
Set wkb = appExcel.ActiveWorkbook
Set wks = wkb.Sheets(1)
wks.Activate
appExcel.Application.Visible = True

Set objOL = Application
Set objNS = objOL.Session
Set colExpl = objOL.Explorers
Set objExpCal = _
objNS.GetDefaultFolder(olFolderCalendar).GetExplorer
Set objNavMod = objExpCal.NavigationPane.Modules. _
GetNavigationModule(olModuleCalendar)
Set objNavGroup = objNavMod.NavigationGroups. _
GetDefaultNavigationGroup(olPeopleFoldersGroup)
For Each objNavFolder In objNavGroup.NavigationFolders
Set objFolder = objNavFolder.Folder
Set oItems = objFolder.Items
Debug.Print (oItems.Count)

For Each MyItem In oItems

--------------:confused:Here i want to export each item into excel sheet that we launched:confused:

--------------Next

Set objExpl = _
colExpl.Add(objFolder, olFolderDisplayNormal)
Next

End Sub
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M please customize this code Using Outlook 1
R Disable conversation thread from replying of recipients in the same subject. Please help Using Outlook 0
Marc2019 Need help please! Cannot Setup my outlook email account on my Mac Outlook 2011 Using Outlook.com accounts in Outlook 2
L Attachment saving and tracking - PLEASE help! Outlook VBA and Custom Forms 5
T Missing text in e-mail message after "(Please keep confidential)" Using Outlook 3
R "Can't store Outlook data files under the AppData folder. Please choose another folder." Using Outlook 6
J Help Please!!! Outlook 2016 - VBA Macro for replying with attachment in meeting invite Outlook VBA and Custom Forms 9
S VBA Macro - Run-time error '424': object required - Help Please Outlook VBA and Custom Forms 3
D Command Button code will not execute. Any suggestions Please. Outlook VBA and Custom Forms 2
L Outlook 2002: HTML Emails Will Not Print: Please Help Using Outlook 0
Diane Poremsky Testing please ignore New Slipstick.com Articles 1
G Outlook 2010 VBA Coding Assistance please! Outlook VBA and Custom Forms 5
joflo copy contents from outlook to excell - please help. Using Outlook 4
A Help with VBA please! Outlook VBA and Custom Forms 15
Denis Hi everyone!!! Need some help with Excel to Exchange Calendar??PLEASE>>> Using Outlook 1
V Please help if you can. Problems with Bcc BCM (Business Contact Manager) 3
C Please Help outlook 2013 Using Outlook 1
J Please help to clarify an IMAP issue Using Outlook 7
M Address book doesn't update contacts? Please any help would be great! Exchange Server Administration 4
M Oh please read---> Extracting email web leads on to excel spread sheet Using Outlook 3
N Please help....winmail.dat issue...slowly going insane..... Using Outlook 1
E Need a bit of education on how Outlook works please Using Outlook 3
O Add please, Outlook Autocomplete working per account in multi profile ! Outlook Wishlist 5
B Can someone please explain account set up from script Using Outlook 1
A help please -Boolean - can I use .AND NOT etc in a rule Exchange Server Administration 0
A Advanced find query facilty Help please Using Outlook 2
F Which upgrade should I go for and how do I do it please? Using Outlook 2
C Can't import distribution list - help, please Using Outlook 1
F Help with Outlook 2007 Macro Please! Using Outlook 4
V [duplicates duplicates duplicates] please help Using Outlook 26
I can't view email body please help! Using Outlook 6
R VBA Macro to VBScript in a form- Help Please! Using Outlook 10
S Need solution to Outlook mail handling/syncing/mobile situation, please Using Outlook 2
S Please help! -- Linked Account field at Business Contacts tab is always empty BCM (Business Contact Manager) 1
e_a_g_l_e_p_i Can someone please answer a question about tasks for me Using Outlook 2
A outlook error Receiving reported error (0x80040900) please help Using Outlook 4
D Help please my Outlook is frozen Using Outlook 3
H Outlook 2010: Cannot start!, please help me! Using Outlook 3
D Outlook 2007 not working>> Please help tried everything Using Outlook 3
U Need a help please Outlook 2007 crashing Using Outlook 2
M Updates to exchange server broke code - please help Using Outlook 2
K shared inbox help please Using Outlook 0
P Please Help me Create a Macro ! Using Outlook 2
J Help please Using Outlook 30
D A little bit of help with headers please? Exchange Server Administration 1
L PLEASE HELP: reconnect existing PST file to imap account Using Outlook 5
L PLEASE HELP: reconnect existing PST file to imap account Using Outlook 1
B Please help! Outlook, Exchange Server, and Customization BCM (Business Contact Manager) 2
B Please help! Outlook, Exchange Server, and Customization Exchange Server Administration 0
D Please help. My live.edu mail will not sync. Using Outlook.com accounts in Outlook 1

Similar threads

Top