M
Marceepoo
The Outlook 2003 macro below generates the following error message (and I
can't figure out why):
Run-time error '-1698234363 (9ac70005)':
You cannot move or copy items from the root of Public Folders.
The user profile can "manually" perform the export (i.e., click File, Import
and Export, Export to a
file, etc.) The user name has administrative privileges on the Exchange
server and on the local
computer.
Does anyone have any suggestions about what to change, so that I could copy
all public folders to
"e:\PFolder_Test.pst"?
Does anyone have any suggestions about what to change, so that I could copy
a particular public folder
address book to "e:\PFolder_Test.pst". The public folder is:
outlook:\\Public Folders\All Public Folders\Contacts ForOfc
The macro follows my "signature". Thanks for taking a look at this.
marceepoo
Here's the macro....
Private Sub Application_StartupPUBLICFfolderOnly()
Dim n As NameSpace
Dim i As Integer
Dim Folder As MAPIFolder
Dim PSTFolder As MAPIFolder
Set n = ThisOutlookSession.Application.GetNamespace("MAPI")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Create a new file
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
n.AddStore "e:\PFolder_Test.pst"
For i = 1 To n.Folders.Count
Set PSTFolder = n.Folders.Item(i)
If PSTFolder.Folders.Count = 1 Then
Exit For
End If
Next
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Calender Folder
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set Folder = n.GetDefaultFolder(olFolderCalendar)
Folder.CopyTo PSTFolder
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Public Folder
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set Folder = n.GetDefaultFolder(olPublicFoldersAllPublicFolders)
Folder.CopyTo PSTFolder
n.RemoveStore PSTFolder
End Sub
can't figure out why):
Run-time error '-1698234363 (9ac70005)':
You cannot move or copy items from the root of Public Folders.
The user profile can "manually" perform the export (i.e., click File, Import
and Export, Export to a
file, etc.) The user name has administrative privileges on the Exchange
server and on the local
computer.
Does anyone have any suggestions about what to change, so that I could copy
all public folders to
"e:\PFolder_Test.pst"?
Does anyone have any suggestions about what to change, so that I could copy
a particular public folder
address book to "e:\PFolder_Test.pst". The public folder is:
outlook:\\Public Folders\All Public Folders\Contacts ForOfc
The macro follows my "signature". Thanks for taking a look at this.
marceepoo
Here's the macro....
Private Sub Application_StartupPUBLICFfolderOnly()
Dim n As NameSpace
Dim i As Integer
Dim Folder As MAPIFolder
Dim PSTFolder As MAPIFolder
Set n = ThisOutlookSession.Application.GetNamespace("MAPI")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Create a new file
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
n.AddStore "e:\PFolder_Test.pst"
For i = 1 To n.Folders.Count
Set PSTFolder = n.Folders.Item(i)
If PSTFolder.Folders.Count = 1 Then
Exit For
End If
Next
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Calender Folder
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set Folder = n.GetDefaultFolder(olFolderCalendar)
Folder.CopyTo PSTFolder
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Public Folder
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set Folder = n.GetDefaultFolder(olPublicFoldersAllPublicFolders)
Folder.CopyTo PSTFolder
n.RemoveStore PSTFolder
End Sub