PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Touch Pro (http://forum.ppcgeeks.com/forumdisplay.php?f=63)
-   -   SOLVED: Anyone have a script for changing the outlook signature? (http://forum.ppcgeeks.com/showthread.php?t=73147)

NinjaDuck 06-28-2009 10:03 PM

SOLVED: Anyone have a script for changing the outlook signature?
 
Ok. Periodically I research this and still never find an answer. Everytime you flash your phone, outlook reverts back to the "Sent from Windows Mobile" default sig.

Has anyone figured out how to edit this with script?

Just figured I would try. This has to be bugging many of you as well. I hope it is not stored in PIM.VOL. I do not see anything in the Pocket Outlook Object Model (POOM) documentation: http://msdn.microsoft.com/en-us/library/aa914277.aspx



Never Mind:


I found the code on the windows mobile team blog:

http://blogs.msdn.com/windowsmobile/...-accounts.aspx


#include <atlbase.h>
#include <cemapi.h>

HRESULT AddSignatureToAccount()
{
HRESULT hr;

CComPtr<IMAPITable> ptbl;
CComPtr<IMAPISession> pSession;
CComPtr<IMsgStore> pMsgStore;

// Log onto MAPI
hr = MAPILogonEx(0, NULL, NULL, 0, static_cast<LPMAPISESSION *>(&pSession));

// You can open a different message store here instead of the default
hr = pSession->OpenMsgStore(NULL, 0, NULL, NULL, 0, &pMsgStore);

SPropValue rgspv[3] = { 0 };

rgspv[0].ulPropTag = PR_CE_SIGNATURE; // signature content
rgspv[0].Value.lpszW = L"Sent from my personal Windows Mobile phone";

rgspv[1].ulPropTag = PR_CE_USE_SIGNATURE; // use the signature in newly composed emails
rgspv[1].Value.b = TRUE;

rgspv[2].ulPropTag = PR_CE_USE_SIGNATURE_REPLY_FORWARD; // use signature in replied or forwarded emails
rgspv[2].Value.b = TRUE;

// save the data the properties
hr = pMsgStore->SetProps (3, rgspv, NULL);

// Log off
pSession->Logoff(0, 0, 0);

return hr;
}

NinjaDuck 06-28-2009 11:13 PM

Re: SOLVED: Anyone have a script for changing the outlook signature?
 
1 Attachment(s)
Even better. A post about mobile device manager I found had a cooked solution:

http://mobilitydojo.net/2009/02/23/s...-mdm-platform/


Used the attached CAB and the following UC script to make it all happen for you:

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Software\MobilityDojo.net\DojoSig">
<parm name="Signature" datatype="string" value="{put your sig here}" />
<parm name="UseReplyForward" datatype="integer" value="1" />
<parm name="UseSignature" datatype="integer" value="1" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

NinjaDuck 06-29-2009 10:53 AM

Re: SOLVED: Anyone have a script for changing the outlook signature?
 
Just a little more information:

You will no longer be able to manage the signature using the Menu > Options > Accounts > Signatures interface. Any changes made there will be overwritten by this application.

hafez 08-05-2009 07:39 PM

Re: SOLVED: Anyone have a script for changing the outlook signature?
 
Just perfect...a million thanks. Looked all over for something like this. Can't believe no one else had posted a solution given I found so many asking for it.

shaggylive 08-06-2009 12:39 AM

Re: SOLVED: Anyone have a script for changing the outlook signature?
 
another issue with dojo is it's only the outlook/exchange email, not any other accounts. :(
thanks for the reminder though, I was gettting ready to compare backup options for mail and this would have been forgotten. :)


All times are GMT -4. The time now is 08:49 PM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0