September 15th, 2011, 05:28 PM
Word to Outlook: Auto Generate Custom Form
I am not the best programmer, but I am trying to automate the following process:
1.System Generates Report
2.User Runs a Macro in Word on that Report
a. Macro creates email to customer - Done
b. I want macro to create a post to public folders using a custom form in Outlook - Not Done
I have the code to generate an email to the customer (part a), pulling variables from the report.... I can show you this if you think it will help....
My company uses public folders (which I hate but we use them) to archive files. The customer email needs to be stored in public folders inside a custom form...
I have the following code, but not even sure if I'm on right path...
I would like to be able to have the email pop up from the macro, then a custom form pop up, with the account name pulled from report, and some other identifiers (date submitted, type of report), filled in within the custom form... (icing on cake would somehow be adding the email to the post automaticaly too...)
any ideas on how i do this or resources i can go to? need more details?
Dim myOlApp As Object
Dim myNameSpace As Object
Dim myFolder As Object
Dim myItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.Application.GetNamespace("MAPI")
'path to custom form
'\\Public Folders\All Public Folders
'\Commercial Markets\LM Property\Engineering\LM Prop_Tracker
Set myFolder = myNameSpace.Folders("Public Folders").Folders("All Public folders").Folders("Commercial Markets").Folders("LM Property").Folders("Engineering").Folders("LM Prop_Tracker")
Set myItem = myFolder.Items.Add("IPM.Post.TrackerPost")
Tags for this Thread
Click Here to Expand Forum to Full Width