98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Excel form - outlook document
Excel form - outlook document
Resolved · Medium Priority · Version 2010
Vicki has attended:
Excel VBA Introduction course
Excel form - outlook document
I have a form that I've created in excel which then populates a word document, I've been asked whether I can have the same form populate an outlook document. I currently have the following script to open the word doc - what would I need to do in order to create an email instead of the word doc?
Private Sub CommandButton1_Click()
Dim wapp As Word.Application
Dim wdoc As Word.Document
If Me.OptionButton1 = True Then
Set wapp = CreateObject("Word.Application")
Set wdoc = wapp.Documents.Open("\\emea\emeadata\Alesco\Financial Risks\Key Information Pack\Gallagher\AJG Advised - Wholesale.dotx")
wapp.Visible = True
ElseIf Me.OptionButton2 = True Then
Set wapp = CreateObject("Word.Application")
Set wdoc = wapp.Documents.Open("\\emea\emeadata\Alesco\Financial Risks\Key Information Pack\Gallagher\AJG Advised - Retail New.dotx")
wapp.Visible = True
End If
RE: Excel form - outlook document
Hi Vicky,
Thank you for the forum question.
Yes I can recognise the code.
You will need the reference the Outlook object library the same way as your code reference the Word object library. Then you will need to learn and understand Outlook vba.
If you go the the website rondebruin.nl you will find a lot of examples, you can use. This website is probably the best website if you want to learn how to control Outlook from vba.
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Hide separate columns in Excel 2010If you want to hide columns not adjacent to each other for example, Columns A, C and E then:- |