Example: stock market

outlook-vba

outlook -vba# outlook -vbaTable of ContentsAbout1 Chapter 1: Getting started with outlook -vba2 Remarks2 Examples2 Introduction2 outlook visual Basic for Applications3 Advanced topics3 Chapter 2: introduction Part 1: Gaining access to outlook 's visual Basic Gaining access to outlook 2003's visual Basic Gaining access to the visual Basic Editor in outlook 2007 and Getting started with the visual Basic What you should remember from this part of the tutorial13 Chapter 3: introduction Part 2: Stores and top-level Expected prior Top level What you should remember from this tutorial17 Chapter 4: introduction Part 3: Stores and all their folders18 Introduction18 Examples183. 0 Function GetFldrNames() which is needed for several of the demonstration Referencing a default Referencing any folder within any accessible Listing the names of every folder within every accessible Moving a folder from one parent folder to What you should remember from this part of the tutorial22 Credits24 AboutYou can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: outlook -vbaIt is an unofficial and free outlook -vba ebook created for educational purposes.

1.1 Gaining access to Outlook 2003's Visual Basic Editor 4 1.2 Gaining access to the Visual Basic Editor in Outlook 2007 and later 4 1.3 Getting started with the Visual Basic Editor 8 1.4 What you should remember from this part of the tutorial 13 Chapter 3: Introduction Part 2: Stores and top-level folders 14 Introduction 14 Examples 14

Tags:

  Introduction, Basics, Outlook, Visual, Visual basic, Outlook vba

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of outlook-vba

1 outlook -vba# outlook -vbaTable of ContentsAbout1 Chapter 1: Getting started with outlook -vba2 Remarks2 Examples2 Introduction2 outlook visual Basic for Applications3 Advanced topics3 Chapter 2: introduction Part 1: Gaining access to outlook 's visual Basic Gaining access to outlook 2003's visual Basic Gaining access to the visual Basic Editor in outlook 2007 and Getting started with the visual Basic What you should remember from this part of the tutorial13 Chapter 3: introduction Part 2: Stores and top-level Expected prior Top level What you should remember from this tutorial17 Chapter 4: introduction Part 3: Stores and all their folders18 Introduction18 Examples183. 0 Function GetFldrNames() which is needed for several of the demonstration Referencing a default Referencing any folder within any accessible Listing the names of every folder within every accessible Moving a folder from one parent folder to What you should remember from this part of the tutorial22 Credits24 AboutYou can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: outlook -vbaIt is an unofficial and free outlook -vba ebook created for educational purposes.

2 All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to 1: Getting started with outlook -vbaRemarksThis section provides an overview of what outlook -vba is, and why a developer might want to use should also mention any large subjects within outlook -vba, and link out to the related topics. Since the Documentation for outlook -vba is new, you may need to create initial versions of those related are currently three topics introducing outlook VBA and at least three more are 1 describes how to get access to the visual Basic you are a user of outlook 2003 and a user of Excel VBA, you will learn little for this part since accessing the outlook visual Basic Editor is the same as accessing the Excel visual Basic outlook 2007 and later, the Developer tab.

3 Which gives access to the visual Basic Editor, is not displayed for a new installation. To display the Developer tab, you must perform an number of steps which are described in this part. There is no code in this 2 and 3 describe stores and folders which are where outlook stores data. You could think of them as the equivalent of Excel's workbooks and worksheets. The division between part 2 and 3 is somewhat arbitrary. Part 2 describes stores and folders and includes macros to display the names of all accessible stores and the top level folders within those stores. Part 3 includes macro for accessing lower level folders. One pair of macros uses recursion which a new programmer may find difficult to understand. The reader should aim to understand all the code in Part 2. It would however be legitimate to understand what that pair of macros does but not understand how they achieve their 4, the next part to be written, will introduce MailItems which hold emails.

4 Part 3 includes a macro to move a folder from one parent to another but most macros operate on the objects contained within folders not folders themselves. Judging from the questions on Stack overflow, MailItems are of most interest to 5 will introduce CalendarItems which hold appointments. Part 6 will introduce the creation of new Excel workbooks from outlook and the reading and updating of existing workbooks. Part 7 will introduce Events unless some more immediately important topic is is important to understand this is an introduction to outlook VBA not an introduction to VBA. Part 2 gives some guidance on where to get information on VBA but since the language is the same all Office products, a description of it belongs outside this introduction to outlook visual Basic for ApplicationsVisual Basic for Applications (VBA) is the macro language behind all Microsoft Office products and is essentially identical across all Office products.

5 What differs from product to product is the Object model. Excel has workbooks, worksheets and cells. Access has tables and attributes. outlook has folders, emails and appointments. It is the Object Model that makes Excel VBA different from outlook topicsThe various parts of the introduction aim to give the information that any programmer new to outlook VBA would need. Much of the code was originally developed with outlook 2003 and has been tested with outlook 2016. It should work unchanged with any intermediate functionality has been introduced since outlook 2003 which programmers will wish/need to access. It is envisaged that "advanced topics" will be written to describe this Getting started with outlook -vba online: 2: introduction Part 1: Gaining access to outlook 's visual Basic EditorIntroductionGaining access to outlook 's visual Basic Editor, inserting your first module and renaming that prior knowledge: You are an outlook outlook 2003, you can immediately select the visual Basic Editor.

6 With later versions, you must add the Developer tab before you can select the visual Basic Gaining access to outlook 2003's visual Basic EditorAll images are from UK versions of outlook . I know that some names are translated into the local language for other versions and I assume that most of the names for the tabs are translated. Probably the sequence of tabs is unchanged in non-English versions. Alternatively, you will need to look at your tabs and decide which would be equivalent of, for example, Tools With outlook 2003 open, the top of the window might look like:Click Tools and move the cursor down to Macros to see:Move the cursor right then down and click visual Basic Editor. Alternatively, exit the selections and click Alt+ Gaining access to the visual Basic Editor in outlook 2007 and images in this section are from the UK version of outlook 2016. I know that some names are translated into the local language for other versions and I assume that most of the names for the tabs are translated.

7 Probably the sequence of tabs is unchanged in non-English versions. Alternatively, you will need to look at your tabs and decide which would be equivalent of, for example, Tools outlook 2010 windows are formatted differently but are essentially identical. I understand other versions are also essentially identical to outlook top of the main window might look like:Click File, on the left, to get the following on the left of the window:Click Options, near the bottom, to get the following on the left of the window: Customize Ribbon, half way down. to get the following on the right of the window: the box next to Developer , near the bottom, to get a tick then click OK, at the bottom. The main window will reappear but will have changed to:Click the new Developer tab to get: visual Basic, on the left, to select the visual Basic Getting started with the visual Basic EditorThe images in this section are all from outlook 2016 but they could have come from outlook 2003.

8 outlook VBA may have changed over the years but to my eyes the VBA Editor has not. Whichever version you have you will see something like: there is a + against "Project1". If you have a + click it and then the + against "Microsoft outlook Objects" to get: Properties window may not be present or, if present, may be positioned elsewhere within the VB Editor window. We do not need it for the moment. You can close it by clicked the cross and can use F4 to make it visible again at any time. I do not normally have it visible because I do not need access to Properties most of the time and my Project Explorer list occupies most of the left side. I suggest you keep it visible until it becomes a you click ThisOutlookSession, either the grey area will turn white or, as in the image below, a code window will appear within the grey area: can type any code into this code window. However, event routines (which are discussed towards the end of this tutorial) must be typed into this code window.

9 I recommend you reserve the ThisOutlookSession code area for event , click Insert to get: on Module to add a module: new module is named Module1 . If your version of outlook is a non-English version, your module will have an equivalent name in your language. You can add more modules which will be named "Module2", "Module3" and so I am creating an Excel workbook, for which I only need one module, I might leave the name as Module1 . But with outlook , all my macros have to go here so I have lots of modules. Over the years I have written many routines which I reuse repeatedly. I have one module for general VBA routines, another for routines to access Excel, another for outlook VBA routines and then one module per outlook task I perform with macros. If you look at the Properties window you will see the only property of a module is its name. Click on the Module1 against Name and you can change it to any valid (starts with a letter, contains letters and number only, etc.)

10 Name. You get strange errors if a module and a procedure have the same name so I start all my module names with Mod and I do not use this prefix for my procedures. Why not rename this module ModIntro or similar ready for the next part of this tutorial?These code areas and like the data entry areas of any editor. Click on the code area to select it and type your code or paste in code copied from elsewhere such as the next section of this What you should remember from this part of the tutorialDid your version of outlook need you to add the Development tab? If so, you will not need to repeat this process until you next have a new outlook installation. Come back here when that happens. Remember how to enter the visual Basic Editor. Remember how to create and rename a module. Read introduction Part 1: Gaining access to outlook 's visual Basic Editor online: 3: introduction Part 2: Stores and top-level foldersIntroductionFirst part of an introduction to stores and the folders they contain.


Related search queries