(The sound of one hand clapping).
Hello there.
I am importing PST files into Outlook, then copying them to a user's "Mailbox" folder.
For testing purposes, I'm using four PSTs:
test-pst-01.pst
test-pst-02.pst
test-pst-03.pst
test-pst-04.pst
Each PST has the following "Name" when individually opened and displayed in Outlook.
Test PST 01
Test PST 02
Test PST 03
Test PST 04
First, I add one PST to the namespace:
$objNameSpace = $namespace->AddStore(<PST>);
Then, I copy the PST to a "destination" folder under my Mailbox folder
$new_obj = $objMapiFolder_Source->CopyTo($objMapiFolder_Dest);
The problem is that when I copy the "source" folder to the "destination" folder, it no longer shows as "Test PST 01" (or such). Instead, it shows as "Top of Personal Folders1". The only clue is that I have a PST named "Personal Folders" in my namespace. However, all of the "items" and/or subfolders from "Test PST 01" are there intact. Just the new folder name is screwy.
I tried using the following syntax to re-name the folders one-by-one:
$new_obj->Name("new folder name")
...which fails quietly
And
$new_obj->Name = "New folder name";
...which gives me an error stating "can't modify non-lvalue subroutine call".
I'm at wits end.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.