That line needs to be changed to use the NameSpace.GetSharedDefaultFolder()
method. Look in the VBA Object Browser for more on that method, but you
basically suppy a Recipient object and folder type somewhat like this:

Dim oRecip As Outlook.Recipient

Set oRecip = ns.CreateRecipient("Joe Foobar")
If oRecip.Resolve() Then
Dim otherInbox As Outlook.MAPIFolder
Set otherInbox = ns.GetSharedDefaultFolder(oRecip, olFolderInbox)
Else
'could not create recipient
End If

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm

"Rivers" <Rivers@discussions.microsoft.com> wrote in message
news:CCC07D6D-C18C-4C4C-9E3C-C28685CB1CCF@microsoft.com...
> hi all i have this macro i gained from
> http://www.fontstuff.com/outlook/oltut01.htm to remove all attatchments
> from
> my emails and putting them directly into a folder selected by myself but
> this
> works only for my default mailbox however i would like to change this to
> another account as tis is required onl for this inbox. the code is as
> follows
>
> Dim ns As NameSpace
> Dim Inbox As MAPIFolder
> Dim SubFolder As MAPIFolder
> Dim Item As Object
> Dim Atmt As Attachment
> Dim FileName As String
> Dim i As Integer
> Dim varResponse As VbMsgBoxResult
> Set ns = GetNamespace("MAPI")
> Set Inbox = ns.GetDefaultFolder(olFolderInbox)
>
> i believe i need to change something on the last line
> Set Inbox = ns.GetDefaultFolder(olFolderInbox)
> but dont understand or no what the code is. im not at all affuent in VBA
> coding for Outlook but have some understanding for excel and access so any
> help would be appreciated.
>
> thanks
>
> Rivers
>
01 Julchanging locating inbox Via VB HELP.Rivers
01 Jul\ Re: changing locating inbox Via VB HELP.Ken Slovak - [MVP - O...
01 Jul   \ Re: changing locating inbox Via VB HELP.Rivers
01 Jul      \ Re: changing locating inbox Via VB HELP.Ken Slovak - [MVP - O...
02 Jul         \ Re: changing locating inbox Via VB HELP.Rivers
02 Jul            \ Re: changing locating inbox Via VB HELP.Ken Slovak - [MVP - O...
02 Jul               \ Re: changing locating inbox Via VB HELP.Rivers
All times are in (US) Eastern Daylight Time (GMT -4:00)