PC Review


Reply
Thread Tools Rate Thread

Active explorer issue

 
 
Ashish
Guest
Posts: n/a
 
      26th Aug 2009
In Active inspector when open a mail, If add an attachment to a mail and
dont call Save function then this attachment will not update on exchange
server for this mail.

But In active explorer when select a mail we add attachment to a mail and
dont save save function. Attachment is updated on exchange server for this
mail. Is there any reason for that? Can we avoid saving? Outlook
version-2003


 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      26th Aug 2009
How are you adding an attachment in ActiveExplorer()? Is it with code or
from the UI. If using code show it.

In general you always have to save, possibly unless in-cell editing is
enabled and that affects automatically saving any changes. See if the Saved
property on the item has changed after you add the attachment in the
Explorer.

--
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


"Ashish" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In Active inspector when open a mail, If add an attachment to a mail and
> dont call Save function then this attachment will not update on exchange
> server for this mail.
>
> But In active explorer when select a mail we add attachment to a mail and
> dont save save function. Attachment is updated on exchange server for this
> mail. Is there any reason for that? Can we avoid saving? Outlook
> version-2003
>


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      27th Aug 2009
I'm adding attachment in code under explorer_viewchange event(when selecta
mail item). When i add attachment to a mail in ActiveExplorer->ViewChange
event, mail item save property returns false. But when i select another mail
item item and check Save property of previous mail item where i add
attachment then it returns true. It means that attachment is added on
exchange server.
How to use in-cell editing ?? Can we avoid saving if we add an attachment.
My user is exchange server user and has cached mode on.

//in c++ event number is 0xf007

Outlook::_MailItemPtr pMailItem = NULL;
Explorer_ViewChange()
{
if(pMailItem != NULL)//if we select an item before and already add
attachment to it
{
bool issaved = pMailItem->GetSaved(); //GetSaved return true
}
else
{
Outlook::SelectionPtr spSelections = ActiveExplorer->Selection;
if( spSelections)
{
int selecteditems = spSelections->Count;
if(selecteditems == 1)
{
pMailItem = spSelections->Item(1);
pMailItem ->Attachments->Add("c:/filename.txt");
bool issaved = pMailItem->GetSaved(); //GetSaved
return false
}//here i dont call pMailItem->save function
}
}
}
"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How are you adding an attachment in ActiveExplorer()? Is it with code or
> from the UI. If using code show it.
>
> In general you always have to save, possibly unless in-cell editing is
> enabled and that affects automatically saving any changes. See if the
> Saved property on the item has changed after you add the attachment in the
> Explorer.
>
> --
> 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
>
>
> "Ashish" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> In Active inspector when open a mail, If add an attachment to a mail and
>> dont call Save function then this attachment will not update on exchange
>> server for this mail.
>>
>> But In active explorer when select a mail we add attachment to a mail and
>> dont save save function. Attachment is updated on exchange server for
>> this mail. Is there any reason for that? Can we avoid saving? Outlook
>> version-2003
>>

>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      27th Aug 2009
Do you mean the ViewSwitch() event? There is no ViewChange() event. Why
aren't you using Explorer.SelectionChange(), that would be the correct event
to handle.

--
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


"Ashish" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm adding attachment in code under explorer_viewchange event(when selecta
> mail item). When i add attachment to a mail in ActiveExplorer->ViewChange
> event, mail item save property returns false. But when i select another
> mail item item and check Save property of previous mail item where i add
> attachment then it returns true. It means that attachment is added on
> exchange server.
> How to use in-cell editing ?? Can we avoid saving if we add an attachment.
> My user is exchange server user and has cached mode on.
>
> //in c++ event number is 0xf007
>
> Outlook::_MailItemPtr pMailItem = NULL;
> Explorer_ViewChange()
> {
> if(pMailItem != NULL)//if we select an item before and already add
> attachment to it
> {
> bool issaved = pMailItem->GetSaved(); //GetSaved return true
> }
> else
> {
> Outlook::SelectionPtr spSelections = ActiveExplorer->Selection;
> if( spSelections)
> {
> int selecteditems = spSelections->Count;
> if(selecteditems == 1)
> {
> pMailItem = spSelections->Item(1);
> pMailItem ->Attachments->Add("c:/filename.txt");
> bool issaved = pMailItem->GetSaved(); //GetSaved
> return false
> }//here i dont call pMailItem->save function
> }
> }
> }


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      27th Aug 2009
Sorry it's explorer.selectionchange
it's call when i change selection on any mail/folder
"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Do you mean the ViewSwitch() event? There is no ViewChange() event. Why
> aren't you using Explorer.SelectionChange(), that would be the correct
> event to handle.
>
> --
> 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
>
>
> "Ashish" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I'm adding attachment in code under explorer_viewchange event(when
>> selecta mail item). When i add attachment to a mail in
>> ActiveExplorer->ViewChange event, mail item save property returns false.
>> But when i select another mail item item and check Save property of
>> previous mail item where i add attachment then it returns true. It means
>> that attachment is added on exchange server.
>> How to use in-cell editing ?? Can we avoid saving if we add an
>> attachment. My user is exchange server user and has cached mode on.
>>
>> //in c++ event number is 0xf007
>>
>> Outlook::_MailItemPtr pMailItem = NULL;
>> Explorer_ViewChange()
>> {
>> if(pMailItem != NULL)//if we select an item before and already add
>> attachment to it
>> {
>> bool issaved = pMailItem->GetSaved(); //GetSaved return true
>> }
>> else
>> {
>> Outlook::SelectionPtr spSelections = ActiveExplorer->Selection;
>> if( spSelections)
>> {
>> int selecteditems = spSelections->Count;
>> if(selecteditems == 1)
>> {
>> pMailItem = spSelections->Item(1);
>> pMailItem ->Attachments->Add("c:/filename.txt");
>> bool issaved = pMailItem->GetSaved(); //GetSaved
>> return false
>> }//here i dont call pMailItem->save function
>> }
>> }
>> }

>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      28th Aug 2009
If you want to know whether or not an item in a Selection is changed you
handle SelectionChange(). When that fires you get the new Selection. You can
then set up handlers for each item in the Selection and handle the
AttachmentAdd() event or the BeforeAttachmentSave() event or any other
attachment related event you want to track.

--
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


"Ashish" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Sorry it's explorer.selectionchange
> it's call when i change selection on any mail/folder


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      28th Aug 2009
So if i handle those attachment events and avoid saving then it will not
update on exchange server. But will it allow to add attachment to mail and
display in outlook when we select a mail?
"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:egziUR%(E-Mail Removed)...
> If you want to know whether or not an item in a Selection is changed you
> handle SelectionChange(). When that fires you get the new Selection. You
> can then set up handlers for each item in the Selection and handle the
> AttachmentAdd() event or the BeforeAttachmentSave() event or any other
> attachment related event you want to track.
>
> --
> 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
>
>
> "Ashish" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Sorry it's explorer.selectionchange
>> it's call when i change selection on any mail/folder

>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      28th Aug 2009
Why not try it and see?

--
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


"Ashish" <(E-Mail Removed)> wrote in message
news:eFcBT$%(E-Mail Removed)...
> So if i handle those attachment events and avoid saving then it will not
> update on exchange server. But will it allow to add attachment to mail and
> display in outlook when we select a mail?


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      1st Sep 2009
i tried it but attachment still save on exchange server. I handle
beforeattachmentsave and addattachment and cancel the saving but attachment
still save on exchange server. I follow below link to avoid saving
http://codeidol.com/csharp/c-sharp-i...k-Item-Events/


To avoid saving when i select another mail i delete attachments from
previous mail and call save function. But this modify mail date. I want to
add attachment in mail without modifying its date.
"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Why not try it and see?
>
> --
> 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
>
>
> "Ashish" <(E-Mail Removed)> wrote in message
> news:eFcBT$%(E-Mail Removed)...
>> So if i handle those attachment events and avoid saving then it will not
>> update on exchange server. But will it allow to add attachment to mail
>> and display in outlook when we select a mail?

>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      1st Sep 2009

I'm afraid what you want can't be done. If you modify an item it will get
some date related fields also modified. Not much you can do about that.

--
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


"Ashish" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>i tried it but attachment still save on exchange server. I handle
>beforeattachmentsave and addattachment and cancel the saving but attachment
>still save on exchange server. I follow below link to avoid saving
> http://codeidol.com/csharp/c-sharp-i...k-Item-Events/
>
>
> To avoid saving when i select another mail i delete attachments from
> previous mail and call save function. But this modify mail date. I want to
> add attachment in mail without modifying its date.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
active x issue theclyburns Windows XP Help 4 23rd Jan 2009 11:13 PM
Active x issue Jim Bunton Microsoft Outlook 1 1st Mar 2007 12:23 AM
Possible active X issue Dwight Windows XP Networking 1 21st Apr 2004 02:21 PM
Active Dir issue and XP Tryon Microsoft Windows 2000 Active Directory 3 30th Jan 2004 12:44 PM
active x issue Techsupport Windows XP Networking 0 14th Nov 2003 03:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:22 PM.