![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have the following code, but I can't seem to find a way to directly post to
my current folder. The postitem always goes to the Inbox. If I add the move function I can put it in the correct folder, but then the post is closed and I have to open it an revise the contents to add my comments. I'd greatly appreciate some help with this. Thanks, Jim As an example, I have a personal folders (.pst file) containing active tickets. With each ticket I track all email and activity and make comments about contacts with customers. The Post in this Folder (say Ticket1) is what I'm trying to get, but with the added infomation already displayed in the Subject Field. Active Tickets Ticket1 Ticket2 ..etc Sub myPost() Dim olApp As Outlook.Application Dim objPost As Outlook.PostItem Dim onsMapi As Outlook.NameSpace Dim ofldrSrc As Outlook.MAPIFolder Dim strReport As String ' Get the current Folder Set olApp = Outlook.Application Set onsMapi = olApp.GetNamespace("MAPI") Set ofldrSrc = olApp.ActiveExplorer.CurrentFolder Set objPost = olApp.CreateItem(olPostItem) strReport = ofldrSrc With objPost .Subject = "Service Desk ticket - " & Right(strReport, 8) '.Post .Display End With 'objPost.Move ofldrSrc End Sub |
Ads |
#2
|
|||
|
|||
![]()
Set ofldrSrc = olApp.ActiveExplorer.CurrentFolder
Set objPost = ofldrSrc.Items.Add("IPM.Post") -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "JimRBG" wrote in message ... I have the following code, but I can't seem to find a way to directly post to my current folder. The postitem always goes to the Inbox. If I add the move function I can put it in the correct folder, but then the post is closed and I have to open it an revise the contents to add my comments. I'd greatly appreciate some help with this. Thanks, Jim As an example, I have a personal folders (.pst file) containing active tickets. With each ticket I track all email and activity and make comments about contacts with customers. The Post in this Folder (say Ticket1) is what I'm trying to get, but with the added infomation already displayed in the Subject Field. Active Tickets Ticket1 Ticket2 ..etc Sub myPost() Dim olApp As Outlook.Application Dim objPost As Outlook.PostItem Dim onsMapi As Outlook.NameSpace Dim ofldrSrc As Outlook.MAPIFolder Dim strReport As String ' Get the current Folder Set olApp = Outlook.Application Set onsMapi = olApp.GetNamespace("MAPI") Set ofldrSrc = olApp.ActiveExplorer.CurrentFolder Set objPost = olApp.CreateItem(olPostItem) strReport = ofldrSrc With objPost .Subject = "Service Desk ticket - " & Right(strReport, 8) '.Post .Display End With 'objPost.Move ofldrSrc End Sub |
#3
|
|||
|
|||
![]()
Sue,
Thank you very much. That was what I was missing. Jim "Sue Mosher [MVP-Outlook]" wrote: Set ofldrSrc = olApp.ActiveExplorer.CurrentFolder Set objPost = ofldrSrc.Items.Add("IPM.Post") -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "JimRBG" wrote in message ... I have the following code, but I can't seem to find a way to directly post to my current folder. The postitem always goes to the Inbox. If I add the move function I can put it in the correct folder, but then the post is closed and I have to open it an revise the contents to add my comments. I'd greatly appreciate some help with this. Thanks, Jim As an example, I have a personal folders (.pst file) containing active tickets. With each ticket I track all email and activity and make comments about contacts with customers. The Post in this Folder (say Ticket1) is what I'm trying to get, but with the added infomation already displayed in the Subject Field. Active Tickets Ticket1 Ticket2 ..etc Sub myPost() Dim olApp As Outlook.Application Dim objPost As Outlook.PostItem Dim onsMapi As Outlook.NameSpace Dim ofldrSrc As Outlook.MAPIFolder Dim strReport As String ' Get the current Folder Set olApp = Outlook.Application Set onsMapi = olApp.GetNamespace("MAPI") Set ofldrSrc = olApp.ActiveExplorer.CurrentFolder Set objPost = olApp.CreateItem(olPostItem) strReport = ofldrSrc With objPost .Subject = "Service Desk ticket - " & Right(strReport, 8) '.Post .Display End With 'objPost.Move ofldrSrc End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|