![]() |
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
|
|||
|
|||
![]()
Does anyone know the line of code line that will return the name of the pst
file currently selected. Below is part of the code that precedes where I want to insert the line to get the pst file name Sub ExportToExcel() On Error GoTo ErrHandler 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 Dim msg As Outlook.MailItem Dim nms As Outlook.NameSpace Dim fname As Outlook.NameSpace Dim fld As Outlook.MAPIFolder Dim itm As Object strSheet = "email recovery.xlsx" strPath = "D:\Mod 50 project\pst files Mod 50 project\" strSheet = strPath & strSheet 'Debug.Print strSheet 'Select export folder Set nms = Application.GetNamespace("MAPI") Set fld = nms.PickFolder 'I want to insert the line here' 'more code follows to put the fields in the email messages in the folder 'fld' into an Excel spreadsheet -- russ |
#2
|
|||
|
|||
![]()
In Outlook 2007, use the Folder.Store.FilePath property. In earlier
versions, you can hack it from the StoreID; see http://www.outlookcode.com/codedetail.aspx?id=1434 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Russ" wrote in message ... Does anyone know the line of code line that will return the name of the pst file currently selected. Below is part of the code that precedes where I want to insert the line to get the pst file name Sub ExportToExcel() On Error GoTo ErrHandler 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 Dim msg As Outlook.MailItem Dim nms As Outlook.NameSpace Dim fname As Outlook.NameSpace Dim fld As Outlook.MAPIFolder Dim itm As Object strSheet = "email recovery.xlsx" strPath = "D:\Mod 50 project\pst files Mod 50 project\" strSheet = strPath & strSheet 'Debug.Print strSheet 'Select export folder Set nms = Application.GetNamespace("MAPI") Set fld = nms.PickFolder 'I want to insert the line here' 'more code follows to put the fields in the email messages in the folder 'fld' into an Excel spreadsheet -- russ |
#3
|
|||
|
|||
![]()
Sue,
Thanks works perfectly. It is a bit more than the one line I thought it would be. God knows how long it would have taken me on my own. Again, many thanks. -- russ "Sue Mosher [MVP]" wrote: In Outlook 2007, use the Folder.Store.FilePath property. In earlier versions, you can hack it from the StoreID; see http://www.outlookcode.com/codedetail.aspx?id=1434 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Russ" wrote in message ... Does anyone know the line of code line that will return the name of the pst file currently selected. Below is part of the code that precedes where I want to insert the line to get the pst file name Sub ExportToExcel() On Error GoTo ErrHandler 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 Dim msg As Outlook.MailItem Dim nms As Outlook.NameSpace Dim fname As Outlook.NameSpace Dim fld As Outlook.MAPIFolder Dim itm As Object strSheet = "email recovery.xlsx" strPath = "D:\Mod 50 project\pst files Mod 50 project\" strSheet = strPath & strSheet 'Debug.Print strSheet 'Select export folder Set nms = Application.GetNamespace("MAPI") Set fld = nms.PickFolder 'I want to insert the line here' 'more code follows to put the fields in the email messages in the folder 'fld' into an Excel spreadsheet -- russ . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
trying to export .aba file from Palm Desktop to .csv file and havingproblems with irregular characters | Joe | Outlook - General Queries | 1 | May 4th 08 05:18 PM |
Outlook 2002 SP3: Can't open file: *.msg. The file may not exist, youmay... | [email protected] | Outlook - General Queries | 6 | February 7th 08 03:02 PM |
PRF file problem wiht personal folders data file password protecte | Groupex1 | Outlook - Installation | 0 | November 1st 07 09:01 PM |
Outlook file translators stuck on a default data file or not worki | Charles griffiths | Outlook - Using Contacts | 2 | April 23rd 07 12:50 PM |
excel file type missing from import a file window in outlook | xanadufl | Outlook - Using Contacts | 9 | February 28th 06 10:55 AM |