Run-time error '-1698234363 (9ac70005)':cannot move or copy items

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
 
W

Warner Wang [MSFT]

Hi,

Thank you for posting here!

Please note that the partner newsgroups are provided for specific break/fix
issues and simple how to questions.

For assistance with this coding issue, please consider these resources:

1. MSDN newsgroups
http://msdn.microsoft.com/newsgroups/default.asp

2. Public newsgroups for peer experiences and recommendations:
microsoft.public.

3. ISV Advisory Services
If you have the ISV Competency, Microsoft Global Partner Support
Delivery ISV team offers the advisory services to your development projects
with best practices, .Net migration guidance, architecture guidance, code
samples and technology workshops.
Advisory services are offered as part of the partner benefits at no
extra charge.

The services can be accessed either by email or phone:
(e-mail address removed) (for Gold Partners)
(e-mail address removed) (for Certified Partners)
(e-mail address removed) (for Empower Partners)

Phone: 1-800-426-9400, option 4, your partner level member services,
and follow the instructions for ISV advisory services.

I hope this information is helpful in getting started and we invite you to
post again with any specific break/fix issues.

Have a good weekend!

Warner Wang
MCSE 2000&MCDBA
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
======================================================
PLEASE NOTE: The partner managed newsgroups are provided to assist with
break/fix issues and simple how to questions.

We also love to hear your product feedback!
Let us know what you think by posting
from the web interface: Partner Feedback
from your newsreader: microsoft.private.directaccess.partnerfeedback.
We look forward to hearing from you!
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
======================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top