ParameterBindingException when pipelining an Outlook.Folder object to custom cmdlet

Hello all-
I've written a simple C# powershell cmdlet (Get-Store) that returns an Outlook Object Model Store object. Another cmdlet I've written reads the above Store object from the pipeline and creates an email folder (Get-Folder)
I get a ParameterBindingException when piping the returned store object from Get-Store to Get-Folder.
If I create the store object manually on the PS command line, via new-object, then pipe it to Get-Folder, it works.
It appears the errant store object is a __comObject type, while the store object that works is a Outlook.StoreClass type. Does anyone know how I can make this work?
Here's a transcript of the PS session:
PS c:\ps\mapi\bin\x64\Debug> import-module .\mapi.dll
PS C:\ps\mapi\bin\x64\Debug> $app = new-object -com Outlook.Application
PS C:\ps\mapi\bin\x64\Debug> $stores = $app.Session.stores
PS C:\ps\mapi\bin\x64\Debug> $storeOK = $stores[1]
PS C:\ps\mapi\bin\x64\Debug> $storeOK.GetType()
IsPublic IsSerial Name                                    
BaseType
True     False    StoreClass                              
System.__ComObject
PS C:\ps\mapi\bin\x64\Debug> $storeOK | Get-Folder -path inbox\works -CreateIfNotExist
Application            : Microsoft.Office.Interop.Outlook.ApplicationClass
Class                  : 2
Session                : Microsoft.Office.Interop.Outlook.NameSpaceClass
Parent                 : System.__ComObject
DefaultItemType        : 0
DefaultMessageClass    : IPM.Note
Description            :
EntryID                : 0000000029542A42175B114D983D2C3446907A490100B870629719727B4BA82A6C06A31C2912004C5FB6DB8F0000
Folders                : System.__ComObject
Items                  : System.__ComObject
Name                   : works
StoreID                : 0000000038A1BB1005E5101AA1BB08002B2A56C20000454D534D44422E444C4C00000000000000001B55FA20AA6611
                         CD9BC800AA002FC45A0C00000048514D41494C5356523031002F6F3D4964656E746943727970742F6F753D45786368
                         616E67652041646D696E6973747261746976652047726F7570202846594449424F484632335350444C54292F636E3D
                         526563697069656E74732F636E3D6C657300
UnReadItemCount        : 0
UserPermissions        : System.__ComObject
WebViewOn              : False
WebViewURL             :
WebViewAllowNavigation : True
AddressBookName        :
ShowAsOutlookAB        : False
FolderPath             :
\\[email protected]\Inbox\works
InAppFolderSyncObject  : False
CurrentView            : System.__ComObject
CustomViewsOnly        : False
Views                  : System.__ComObject
MAPIOBJECT             : System.__ComObject
FullFolderPath         :
\\[email protected]\Inbox\works
IsSharePointFolder     : False
ShowItemCount          : 1
Store                  : System.__ComObject
PropertyAccessor       : System.__ComObject
UserDefinedProperties  : System.__ComObject
PS C:\ps\mapi\bin\x64\Debug> $storeNotOK = Get-Store -StoreName
[email protected]
PS C:\ps\mapi\bin\x64\Debug> $storeNotOK.GetType()
IsPublic IsSerial Name                                    
BaseType
True     False    __ComObject                             
System.MarshalByRefObject
PS C:\ps\mapi\bin\x64\Debug> $storeNotOK | Get-Folder -path inbox\DoesntWork -CreateIfNotExist
Get-Folder : The input object cannot be bound to any parameters for the command either because the command does not
take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:15
+ $storeNotOK | Get-Folder -path inbox\DoesntWork -CreateIfNotExist
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (System.__ComObject:PSObject) [Get-Folder], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,mapi.Get_OutlookFolder
Here's the code:
namespace mapi
    [Cmdlet(VerbsCommon.Get,
"Store")]
public class
Get_Store : PSCmdlet
protected override
void ProcessRecord()
base.ProcessRecord();
this.WriteObject(_getStore());
this.WriteDebug("Get-App::ProcessRecord");
public Application _getApplication()
Application app = new
Application();
return app;
        [Parameter(Position = 0, ValueFromPipeline =
false)]
        [ValidateNotNullOrEmpty]
public string StoreName
get { return _storeName; }
set { _storeName = value.ToLower(); }
string _storeName;
public Store _getStore()
Application app = null;
            try
if (null == _storeName)
throw new
ArgumentException("Missing argument 'StoreName'");
                app = _getApplication();
foreach (Store store
in app.Session.Stores)
if (store.DisplayName.ToLower() == _storeName)
return store;
if (null != store)
Marshal.ReleaseComObject(store);
return null;
finally
if (null != app)
Marshal.ReleaseComObject(app);
    [Cmdlet(VerbsCommon.Get,
"Folder")]
public class
Get_OutlookFolder : PSCmdlet
        [Parameter(Position = 0, ValueFromPipeline =
true, ValueFromPipelineByPropertyName =
false)]
        [ValidateNotNullOrEmpty]
public Microsoft.Office.Interop.Outlook.Store Store
get
                return _store;
set
                _store =
value;
Store _store;
        [Parameter(Position = 0,ValueFromPipeline =
false)]
public string Path
get { return _folderPath; }
set { _folderPath = value; }
string _folderPath;
        [Parameter(Position = 1, ValueFromPipeline =
false)]
public SwitchParameter CreateIfNotExist
get { return _createIfNotExist; }
set { _createIfNotExist =
value; }
bool _createIfNotExist=false;
        protected
override void ProcessRecord()
this.WriteDebug("Get-Folder::ProcessRecord");
this.WriteObject(_createFolder());
private void _createOrOpenFolder(string path,
MAPIFolder parent, ref
MAPIFolder ret)
if (null == path ||
"" == path)
                ret = parent;
return;
string [] toks = path.Split('\\');
if (null == toks)
throw new
ArgumentException("folder path is invalid: " + _folderPath);
string folderName = toks[0];
MAPIFolder targetFolder = SearchChildFolders(parent, folderName);
if (null != targetFolder)
                path = path.Remove(0, folderName.Length);
                path = path.TrimStart('\\');
                _createOrOpenFolder(path, targetFolder,
ref ret);
else
// start creating
if (_createIfNotExist)
foreach (string newFolderName
in toks)
//if (null != targetFolder)
// Marshal.ReleaseComObject(targetFolder);
                        targetFolder = parent.Folders.Add(newFolderName);
//Marshal.ReleaseComObject(parent);
                        parent = targetFolder;
// return the last one on the path
                    ret = targetFolder;
else
throw new
ItemNotFoundException("Folder '" + folderName +
"' not on the path '" + _folderPath +
"' and CreateIfNotExist argument not passed.");
MAPIFolder SearchChildFolders(MAPIFolder parent,
string name)
foreach (MAPIFolder f
in parent.Folders)
if (f.Name.ToLower() == name)
return f;
else
Marshal.ReleaseComObject(f);
return null;
// return the requested folder.
public MAPIFolder _createFolder()
if (null == _folderPath)
throw new
ArgumentNullException("_folderPath");
if (null == _store)
throw new
ArgumentNullException("_store");
MAPIFolder ret = null;
            _createOrOpenFolder(_folderPath,
_store.GetRootFolder(),
                                ref
ret);
return ret;

Hi Lesthaler,
For the error you got in powershell, please confirm the parameter in the cmdlet Get-Folder accepts what kind of pipeline input type, this error indicates a wrong pipeline type.
For more detailed information to troubleshoot this error, you can also check this article:
about_Pipelines
If you need suggestions of the C# script, please go to the C# forum for a more effective support:
Visual C#
I hope this helps.

Similar Messages

  • Duplicate emails in Junk E-Mail folder when running multiple Outlook clients

    Has anyone experienced problems when running multiple Outlook clients - and a junk e-mail is received?
    We are seeing that when a user is running 3 Outlook clients (2007/2010) - and they received a junk email - Outlook seems to take that email and movie to the folder. However, with 3 clients, there end up being 3 copies of the email.
    Mail clients are Outlook 2007/2010 running in native Exchange mode (no IMAP, POP, etc). Server is Exchange 2010 SP1, RU2.
    Antivirus is McAfee VirusScan Enterprise 8.7.0i  - but we believe that the problem occurs even with it disabled.

    hi, we also faced the same issue.
    we had a common mailbox that is accessed from different workstations, and the outlook profile is set to cached mode. when a junk mail is received, it will create duplicates according to the number of outlook clients, as what jbuschmann mentioned. Is this
    a known issue in outlook 2010? Understand there's a fix for outlook 2003 for a similar issue, is there a similar fix for outlook 2010? thanks!
    http://support.microsoft.com/kb/832358

  • Count of Email by Sender from Outlook folder

    Is am new to writing VBA code , I would really really appreciate if anyone can help me with a VBA macro that can do the job of counting all emails by the sender's email address , within a particular Outlook folder.
    If the count of emails from a particular sender is more than 1 , it should populate an excel sheet with data of the email adddress and the time of receipt of the mail from that sender .

    It is not clear whether you want to process all the messages in the folder, or just those from a particular sender. The following does the latter.
    The former would be rather more complicated if you want to record messages from senders that have sent more than one message. Recording all messages in a folder is much simpler.
    Change the folder to the location where you want to store the workbook and
    allow the macro to create that workbook.
    Option Explicit
    Private olNS As Outlook.NameSpace
    Private olFolder As Outlook.MAPIFolder
    Private olItems As Outlook.Items
    Private olMsg As Outlook.MailItem
    Private Count As Long
    Private strDate As String
    Private strTime As String
    Private strFrom As String
    Private strEmail As String
    Private strSubject As String
    Private strValues As String
    Private vValues As Variant
    Private ConnectionString As String
    Private strSQL As String
    Private CN As Object
    Private xlApp As Object
    Private xlWB As Object
    Private bXLStarted As Boolean
    Private nAttr As Long
    Private i As Long
    Private Const strTitles As String = "Date|Time|From|E-Mail"
    Private Const strWorkbook As String = "C:\Path\Message Log.xlsx"
    Sub MessageLog()
        Count = 0
        strFrom = InputBox("Enter sender's name to record." & vbCr & _
                           "Exact spelling is essential.")
        If strFrom = "" Then Exit Sub
        Set olNS = Outlook.GetNamespace("MAPI")
        Set olFolder = olNS.PickFolder
        Set olItems = olFolder.Items
        For Each olMsg In olItems
            'MsgBox olMsg.Sender & vbCr & strFrom
            If olMsg.Sender = strFrom Then
                Count = Count + 1
                If Count = 2 Then Exit For
            End If
        Next olMsg
        'MsgBox Count & vbCr & strFrom
        If Count > 1 Then
            MsgBox "A completion message will indicate when the process has finished."
            For Each olMsg In olItems
                If olMsg.Sender = strFrom Then
                    RecordMessage olMsg
                    DoEvents
                End If
            Next olMsg
        End If
        MsgBox "Process Complete."
    lbl_Exit:
        Set olNS = Nothing
        Set olFolder = Nothing
        Set olItems = Nothing
        Set olMsg = Nothing
        Exit Sub
    End Sub
    Sub RecordMessage(Item As Outlook.MailItem)
        strFrom = Item.SenderName
        strEmail = Item.SenderEmailAddress
        strDate = Format(Item.ReceivedTime, "dd/MM/yyyy")
        strTime = Format(Item.ReceivedTime, "h:mm am/pm")
        strSubject = Item.Subject
        strValues = strDate & "', '" & _
                    strTime & "', '" & _
                    strFrom & "', '" & _
                    strEmail
        If Not FileExists(strWorkbook) = True Then xlCreateBook strWorkbook:=strWorkbook, strTitles:=strTitles
        WriteToWorksheet strWorkbook:=strWorkbook, strRange:="Sheet1", strValues:=strValues
    lbl_Exit:
        Exit Sub
    End Sub
    Private Function WriteToWorksheet(strWorkbook As String, _
                                      strRange As String, _
                                      strValues As String)
        ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
                           "Data Source=" & strWorkbook & ";" & _
                           "Extended Properties=""Excel 12.0 Xml;HDR=YES;"";"
        strSQL = "INSERT INTO [" & strRange & "$] VALUES('" & strValues & "')"
        Set CN = CreateObject("ADODB.Connection")
        Call CN.Open(ConnectionString)
        Call CN.Execute(strSQL, , 1 Or 128)
        CN.Close
        Set CN = Nothing
    lbl_Exit:
        Exit Function
    End Function
    Private Sub xlCreateBook(strWorkbook As String, strTitles As String)
        vValues = Split(strTitles, "|")
        On Error Resume Next
        Set xlApp = GetObject(, "Excel.Application")
        If Err <> 0 Then
            Set xlApp = CreateObject("Excel.Application")
            bXLStarted = True
        End If
        On Error GoTo 0
        Set xlWB = xlApp.Workbooks.Add
        With xlWB.Sheets(1)
            For i = 0 To UBound(vValues)
                .Cells(1, i + 1) = vValues(i)
            Next i
        End With
        xlWB.SaveAs strWorkbook
        xlWB.Close 1
        If bXLStarted Then
            xlApp.Quit
            Set xlApp = Nothing
            Set xlWB = Nothing
        End If
    lbl_Exit:
        Exit Sub
    End Sub
    Private Function FileExists(ByVal Filename As String) As Boolean
        On Error GoTo NoFile
        nAttr = GetAttr(Filename)
        If (nAttr And vbDirectory) <> vbDirectory Then
            FileExists = True
        End If
    NoFile:
        Exit Function
    End Function
    Graham Mayor - Word MVP
    www.gmayor.com

  • When I open Outlook 2007 my Firefox 3.6.13 session freezes why is this?

    I am running Firefox 3.6.13 on a Windows XP SP3 PC and I am hitting a problem regularly when I open Outlook 2007 it causes my Firefox session to stop responding to web page load requests.
    When I try to reload FF the system pops up a message saying the process is already running and even when I kill the process using Task Manager and reload the problem remains until I restart my PC and during shutdown I normally get a message about 'nsappshell not closing' until I force close and the system restarts and then the problem disappears. This conflict between Outlook & FF does not happen every time but it is frequent enough to be a real pain ! Anyone else have this problem or have any suggestions??

    I believe I've solved this issue by carrying out the following action:-
    First cancel all “send and receive” operations in OutLook. Next remove all emails from your "Outbox" (by either deleting them or moving them to the “Draft” folder). Next shutdown OutLook and then click on the “Start” button on the lower left-hand side of the Window’s taskbar, then click on “Run” now type in “regsvr32.exe inetcomm.dll” without the quotation marks, so it looks like this:
    regsvr32.exe inetcomm.dll
    Note the space between .exe and inetcomm.dll and hit “Enter” on the keyboard.
    The computer will execute the command. If all goes well in a few moments a dialog box will appear and state “dll registered successful
    I have not had it hand since ... cross fingers ;)

  • Custom ID card creator and MS Outlook contact objects

    I'm working on a project where flash based photo id badge maker like this one quickidcard.com imports data from Outlook contact object, (name, dept, photo etc.) and using XML creates an employee id badge from a template. My problem is that MS Outlook 2010 doesn't seem to support XML natively so the data has to be parsed. I made it running with PST export and XML parse but it's not scalable and drags when more than 20 contacts have to be imported at a time. CSV and vCard export approach is even slower. It's kind of hard to believe Outlook has no direct XML support while Word and Excel use XML as native. Has anyone faced similar problem or has any recommendations how to bite Outlook from Flash perspective?

    correct. I think Outlook exporting objects to PST is the bottleneck. That's why I'm looking for a solution that can hook up to Outlook directly instaed of using export call

  • Outlook.Application Object

    Hello Experts,
    i am using the 'Outlook.Application' object to create a new outlook email item in my ABAP code. everything is fine except when i'm creating an attachment, i don't know how to attach a file to my email. My code look like this.
    REPORT  ztest_outlookobject           .
    INCLUDE ole2incl .
    DATA: lr_outlook TYPE ole2_object,
          lr_mi TYPE ole2_object,
          lr_at TYPE ole2_object.
    CREATE OBJECT lr_outlook 'Outlook.Application'.
    CALL METHOD OF lr_outlook 'CreateItem' = lr_mi
    EXPORTING #1 = 0.
    GET PROPERTY OF lr_mi 'Attachments' = lr_at.
    CALL METHOD OF lr_at 'Add' = 'C:\eraseable.xls'. "<<< the problem is here >>>
    SET PROPERTY OF lr_mi 'To' = 'Bai Cil'.
    SET PROPERTY OF lr_mi 'CC' = '[email protected]'.
    SET PROPERTY OF lr_mi 'Subject' = 'Your subject'.
    SET PROPERTY OF lr_mi 'Body' = 'Some text'.
    CALL METHOD OF lr_mi 'Display'.
    FREE OBJECT lr_outlook.
    but i'm getting this error: "'C:\eraseable.xls'" cannot be changed. -
    Thanks

    thanks guys.
    i found the answer. here it is.
    CALL METHOD OF lr_at 'Add'
    EXPORTING #1 = 'C:\eraseable.xls'.

  • Captivate 8 Continually Crashes: When trying to publish, When trying to use the Object Style Manager. Also it is blocked by Windows Firewall (adobecaptivatews) every time it launches. Working with Captivate App Packager the pane to import from Adobe Edge

    Captivate 8 Continually Crashes: When trying to publish, When trying to use the Object Style Manager. Also it is blocked by Windows Firewall (adobecaptivatews) every time it launches. Working with Captivate App Packager the pane to import from Adobe Edge is missing, so not clear how to import. Overall it seems unstable. Am I doing something wrong? Trying to evaluate before buying so working on a trial version (14 days left), but a bit concerned with Captivate 8 Performance. Please help! :-

    Hi Vikram and Lilybiri,
    Thanks for your responses :-)
    I'm working on Windows 8.1... I think that I may have found the issue... I was saving the file in a project directory rather than the default My Captivate Projects folder...
    Perhaps Captivate was struggling to find resources it needed?
    It hasn't crashed for a while now, though it is struggling - I'm working with a 54 slide PPT presentation that is linked and it takes a very long time to interact.
    Sometimes it says that I've removed slides, which I haven't?
    Best,
    Christy.

  • HT4993 When I send Outlook invites to my iPhone (via email) the appointments appear 3 hours earlier? The time setting appears to be EST which is accurate so I can't figure out why the appointments don't appear in real time.  Thanks for your help, Ellen

    When I send Outlook invites to my iPhone (via email) the appointments appear 3 hours earlier? The time setting appears to be EST which is accurate so I can't figure out why the appointments don't appear in real time.  Thanks for your help, Ellen

    1) The best way to relocate the iTunes library folder is to move the entire iTunes folder with all subfolders to the new path, then press and hold down shift as start iTunes and keep holding until prompted to choose a library, then browse to the relocated folder and open the file iTunes Library.itl inside it.
    If you've done something different then provide some more details about what is where and I should be able to help.
    2) Purchases on the device should automatically transfer to a Purchased on <DeviceName> playlist, but it my depend a bit on whether automatic iCloud downloads are enabled. If there is a cloudy link then the transfer might not happen. You can use File > Devices > Transfer Purchases. In iTunes you should also check out iTunes Store > Quick Links > Purchased > Music > Not on this computer.
    3) Backup the device, then immediately restore it. In some cases you need to add a restore as new device into that equation. Obbviously not to be attempted until you're sure all your media is in your library. See Recover your iTunes library from your iPod or iOS device should it be needed.
    4) I believe there is complimentary 1 incident 90-day support with hardware purchases, but no free software support for iTunes itself. AppleCare gets you a different level of support.
    tt2

  • Separator page prints out with wrong name when printing from Outlook 2010

    Working with Windows 7 Enterprise, Outlook 2010.  We've set up our desk printers to print a separator page with the user's name, as several people use the same printers in our building.  Printing from IE, Word, etc. all work fine, and it'll print
    out the correct username on the separator page.
    When anyone attempts to print an Outlook email, it instead prints out my username.  We've found that it doesn't happen if they click on the "quick print" button, but it happens every time if they do "file > Print" or Ctrl+P.

    Hi
    As per the information and details provided by you that separator page prints out with wrong name when printing from Outlook 2010, please follow these steps: -
    To create a custom separator page file, use a text editor such as
    Notepad. On the very first line, type one single character, and then press
    Enter. The character on this line defines the character used as an escape character. For example, the following list assumes that this character is the at sign (@).
    Enter the escape codes for the functions you want, and then save the file with an .sep extension in the Windows System32 subfolder.
    In the Print Manager, select the printer that you want to use the separator page file with, and then click
    Choose Properties on the Printer menu.
    Click
    Details, specify the name of the desired separator page file in the
    Separator File box, and then click OK.
    Note:
    Put the custom separator page file in one of the following locations:
    In the %Windir%System32 folder.
    In a folder whose path contains a SepFiles folder. For example:
    Drive:\Folder\SepFiles\Subfolder
    I hope this information will be helpful for you.
    Thanks and regards
    Shweta@G 

  • Can a rule be applied to an individual's Outlook folder from the Exchange Server?

    ok... what I want do is create a series of rules so:
    an email sent to my inbox is automatically sent to an Outlook folder
    a rule is then created to send any emails in the folder to a new external email address
    Now - I can do that with client-based rules, but I also want this to work when Outlook is closed and my PC switched off - so can I send a folder from my inbox to another of my folders and then email it out...using SERVER-based rules only?

    Hi,
    1. Based on my knowledge, "an email sent to my inbox is automatically sent to an Outlook folder", we can't create a transport rule to achieve it. But we can create a Inbox rule on Outlook or OWA to achieve it. Here is an example:
    2. About point 2, you can create a transport rule on EAC or EMS to copy the message user1 received to a mail contact(external email address). Here is an example for your reference.
    Hope it helps.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Ovi contacts - can I specify Outlook folder?

    Have had to install Ovi as PC suite 7 wont run on Win 7 upgrade (says already installed when NOT!). Sync with calendar fine, but in Outlook 2007 i have 2 folders - 'Contacts'(1300) and 'Phone Contacts'(250) (in pc suite i didnt want 1500 all contacts in phone).
    Does anyone know how to get Ovi to sync ONLY 'Phone contacts'? is there a registry entry/or option to make contacts sync point ONLY to this Outlook folder like there is in PC Suite?
    Have just synced of course and now have ALL contacts in my phone which is a nightmare!!
    binkey 13 - E71, latest firmaware

    I tried specifying every .pst file on my PC and each time Ovi said 'This information service has not been configured. Select an existing file to configure, or type the name of a new file to create.'
    This locked me into an endless loop. The only way out is to use Task Manager to kill Ovi.
    OK I thought, I'll load my address book into Thunderbird and sync with that. Ovi still insists on having one of my .pst files. Thunderbird does NOT USE .pst files.
    Just to make life more difficult a stupid error message saying Nokia M platform has a problem keeps popping up whilst I'm trying to type.
    I now have a new Nokia phone which is about as much use as the Samsung it replaced. That had no battery life, this one has no contacts, so I can't phone, or text anyone.
    I'm using Ovi 2.2.0.245, so everyone who was advised to upgrade will be wasting their time if they expect it to be better.
    Nokia, Finland's premier brick maker!
    Attachments:
    Stupid error message.jpg ‏21 KB
    Nokia M platform problem.jpg ‏25 KB

  • Creating a shortcut link to a public folder object. Is it possible?

    I have never done this before and never had a reason to until now. I am wondering if there is a way to have a link to a Public Folder object such as an email with attachments sent to users that have Outlook 2010. The reason I am doing this is because we
    send out daily emails with attachments to all users and since Exchange 2010 no longer supports single instance storage, these emails are consuming too much database space. I want the department sending these emails to just send a single copy to a public folder
    and then send a link to that email to all users. Is this even possible?

    Hi,
    From my research, from Exchange 2007 and later version, the url to access public folder is no longer simple and clear as it in Exchange 2003. The hyperlink is long and complicated with a series of number and letter in the end.
    http://technet.microsoft.com/en-us/library/bb397221(v=exchg.141).aspx#Access
    I’d recommend you put files on a shared platform for long-term.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Emails appear as unread when starting up Outlook 2013

    I have a 365 account with 4 email accounts on it, one email address on that account is running office 2013.
    When we start Outlook each morning, all the emails appear in it but are already marked as unread.
    The account is not linked to any phone and has no folder rules applied.
    Any new emails that arrive during the normal day activities are marked as unread. The other 3 addresses are fine.
    Any suggestions?

    I recommend that you post this in the Exchange Online (Office 365) Forum:
    http://social.technet.microsoft.com/Forums/en-US/onlineservicesexchange/threads
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • About Folder object path

    Hello ,
    My name is Avi. I want to create a folder on desktop for mac as well for windows. I want to create this folder using javascript. I am using cs3.
    When anybody try to run this script on any operating system the folder will be create on desktop or any where as per users requirement.
    Is there any logic between paths of mac osx and windows directory. Using that i can create a folder on any operating system.
    I want to create a single script which can use for both operating system.
    I knew how to create a folder using FILE SYSTEM ACCESS
    create a folder object(folderobj)
    To create a folder use folderobj.create().
    Is this information sufficient to understand my problem or i need to explain it more.
    Thank you for your co-operation.

    Thank you Kasyan.
    I have one more question for you.
    I created a edittext field using scriptUI and i want to get the data from that textfield.
    I use variable editcontets to get the data but in this case it not working. I am posting my script. Please let me know if there is any thing wrong i am doing.
    var g3 = myDlg.msgPnl1.add( "group" );
    myDlg.msgPnl1.titleSt = g3.add('statictext', undefined, 'Name: ');
    myDlg.msgPnl1.titleEt = g3.add('edittext', undefined,'Test');
    var amit = myDlg.msgPnl1.titleEt.editContents;
    alert(amit);
    myDlg.msgPnl1.create = g3.add('button', undefined, 'Create');
    myDlg.msgPnl1.titleSt = g3.add('statictext', undefined, ' ');
    when you run the script whatevery data in that text field will come o the variable amit.
    When i am trying to run this script i am getting alert as "undefined".
    I do not why please help me in this matter as well.
    Thank you,

  • Folder object throws IllegalStateException

    I am writing an email program which fetches the mail from Gmail. I have written the below mentioned code to fetch the name of all the folders of a particular client. when the servlet is loaded on the server, after that on the first (on servlet) the code marked (1) and (2) works fine, i.e the Folder object is created but on the subsequent hits, the folder object is not created. It throws an exception:
    java.lang.illegalStateException:not connected
    Why I am not been able to get the Folder object on subsequent hits?
         public ArrayList getCustomFolders(double pin){
                         System.out.println("Getting the name of all folders...");
              String username=(String)username_pin.get(pin);
              HashMap mapmap=(HashMap)map.get(username);
              Store store=(Store)mapmap.get("store");
              ArrayList folders=new ArrayList();
                                   try {
                   Folder folder=store.getDefaultFolder();---------------(1)
                    Folder f[]=folder.list();-------------------------------------(2)
                                                     System.out.print("Folder: ");-------------------//this line is not printed after he first hit.
                   for(Folder f1:f){
                        String foldername=f1.getFullName();
                        System.out.print(foldername+",  ");
                        folders.add(foldername);
                        if(f1.HOLDS_FOLDERS!=0){
                             Folder subfolders[]=f1.list();
                             for(Folder sub:subfolders){
                                  System.out.print(sub.getFullName()+" ,");
                                  folders.add(sub.getFullName());
              } catch (MessagingException e) {
                   System.out.println("Exception caught while fetching the list of folders");
              }catch(Exception e){
                   System.out.println("Exception caught"+e);
              return folders;
         }Edited by: carox on Mar 23, 2010 2:55 AM
    Edited by: carox on Mar 23, 2010 3:05 AM
    Edited by: carox on Mar 23, 2010 3:06 AM
    Edited by: carox on Mar 23, 2010 3:07 AM

    Because the Store has been closed. Why was it closed? I don't know. I can't see enough of your
    application to tell, but I'm sure you can figure it out. Note that if you leave it open for a long time
    without using it, the server will close it.
    Also, note that this code isn't doing what you expect:
    if(f1.HOLDS_FOLDERS!=0){
    What you meant was:
    if ((f1.getType() & Folder.HOLDS_FOLDERS) != 0) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Unable to move message - the message could not be moved to the mailbox trash

    Hi, I have a yahoo email account and suddenly I am unable to delete emails and send them to trash. This is occurring on my iPhone 4 and iPad. I've been through the forum and tried every suggestion, including: 1. Going into settings, mail etc and into

  • Thumnails won't load, how do I fix this?

    Suddenly, after years of workin in Lightroom 3 on same computer (PC OS is Windows 7), thumbnails will not load. Some will, but seemingly randomly, 95% of them will not from any of numerous external drives nor PC drive. loading ...... keeps showing on

  • Java is loading slow or not working at all -- how can I fix it?

    Hi there I seem to be having problems using the Java on my iMac. When I and open Safari and go to a chat-room that I have went to for years http://chat.parachat.com/chat/login.html My Java takes so long to load. This time it took about 15 minuets to

  • Third party Certificate not showing up in SQL configuration manager drop down box

    Hi, I have an SQL instance that needs to use a third party SSL certificate for all communications to that SQL instance. I have installed my third party certificate via MMC and it is showing under the Personal Folder. However, when i go into the SQL c

  • How to get dATES

    I ve to Database Colum Start_from Date ENd_to DateI want to select all months those are lies between these two dates where months are not saved in any of table. Suppose if I write '01-jul-2009' and '30-jun-2010' then query will return 31-jul-2009 31-