PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro
Register Community Search

Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-28-2009, 10:03 PM
NinjaDuck's Avatar
VIP Duck
Offline
Pocket PC: RAPHAEL / TOPAZ / RHODIUM
Carrier: Verizon
Location: Omnipresent
 
Join Date: Feb 2009
Posts: 825
Reputation: 6270
NinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the communityNinjaDuck is a trusted member of the community
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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;
}

Last edited by NinjaDuck; 06-28-2009 at 10:58 PM. Reason: SOLVED
Reply With Quote
This post has been thanked 1 times.
 

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro


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 On


All times are GMT -4. The time now is 02:15 PM.


Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com