![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi Folks,
I have an Outlook addin from which I'm trying to put localized text into the body of an appointment item. I have a string of localized text, it's cyrillic. I have my machines regional settings set to Russian. When I grab the string from my resource file and try to put it in the body, it comes up garbled, as if Outlook is displaying it in the wrong codepage. I'm sure the localized string is correct. Similar localized strings come up just fine when seen in the toolbar buttons of the addin. Additionally, we have another outlook addin that seems to be able to print localized strings in the body just fine. But for the life of me, I can't figure out the difference between what that addin is doing and what I'm trying to do. I know the old addin puts the body in the message upon pressing the "Send" button where mine does it upon initial open of the appointment item. I know that the old addin saves the appointment first (I've tried doing this to but it didnt help). And I know the old addin uses mapi to open the body property and uses mapi to read what's there before putting in the localized text. My addin doesn't have to do any of that, but I'm going to try doing some of that stuff to see if I can get the localized text to come up right. Does anyone else have any ideas. Can I manually set the codepage of the body somehow? It should already be set since I've switched the machines region to Russian, but who knows. I'm doing the below upon opening the appointment item. szInvitationMsg = new TCHAR [dwSize]; MyFormatMessage(_pModule-GetResourceInstance(), zInvitationMsg, dwSize, IDS_SCOPIA_INVITATION_MAIL, (LPTSTR)CW2T (bstrDesktopInvite), (LPTSTR)CW2T (bstrH323Invite), (LPTSTR)CW2T (bstrPhoneInvite) ) m_pAppointment-put_Body(CComBSTR(szInvitationMsg)); --------------- cod of MyFormat Message() DWORD MyFormatMessage(HINSTANCE hInst, LPTSTR szDest, DWORD nSize, UINT nFormatID, ...) { DWORD dwRes = 0; TCHAR *szFormatString = new TCHAR[nSize]; va_list argList; va_start(argList, nFormatID); dwRes = ::LoadString(hInst, nFormatID, szFormatString, nSize); if (dwRes) { dwRes = ::FormatMessage(FORMAT_MESSAGE_FROM_STRING , szFormatString, 0, 0,(LPTSTR)szDest, nSize, &argList); ATLASSERT(dwRes 0); DWORD dwErr = GetLastError(); dwErr = 0; } va_end(argList); delete szFormatString; return dwRes; } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Import Outlook Body as text only into Access | LI_SpeedyG | Outlook and VBA | 1 | December 15th 06 03:40 PM |
Outlook Language Code Page from MAPI C++ form | m3driver | Add-ins for Outlook | 3 | July 7th 06 06:23 PM |
Outlook 2003 sending blank emails / text missing from body | Keith | Outlook - General Queries | 3 | June 1st 06 02:57 PM |
vba code that insert a hyperlink file in the body of message | gabriel | Outlook and VBA | 3 | April 24th 06 02:51 PM |
Outlook won't display body of plain text message | Mike | Outlook - General Queries | 1 | March 14th 06 07:54 PM |