Click here to Skip to main content
15,891,908 members
Home / Discussions / C#
   

C#

 
Generala stupid and basic question about members Pin
Green Fuze3-Jun-05 23:04
Green Fuze3-Jun-05 23:04 
GeneralRe: a stupid and basic question about members Pin
S. Senthil Kumar3-Jun-05 23:26
S. Senthil Kumar3-Jun-05 23:26 
GeneralRe: a stupid and basic question about members Pin
Green Fuze5-Jun-05 5:52
Green Fuze5-Jun-05 5:52 
GeneralRe: a stupid and basic question about members Pin
WillemM4-Jun-05 0:14
WillemM4-Jun-05 0:14 
GeneralRegular expression Pin
Virendrak3-Jun-05 22:05
Virendrak3-Jun-05 22:05 
GeneralRe: Regular expression Pin
Carsten Zeumer3-Jun-05 23:42
Carsten Zeumer3-Jun-05 23:42 
GeneralRe: Regular expression Pin
Kareem Shaker4-Jun-05 23:10
Kareem Shaker4-Jun-05 23:10 
Generalstuck on an annoying problem in outlook c# Pin
ekynox3-Jun-05 21:27
ekynox3-Jun-05 21:27 
g'day folks,

i am stuck on a small problem relating to the usage of outlook dll in c#. The problem is that I am creating an email using the outlook dll and appending all files listed in a listview as hyperlinks. My copy of outlook displays my signature in every email it creates. Therefore all hyperlinks inserted in the email are inserted at the bottom of the email. What change do I need to make to my code so that it inserts the hyperlinks at the start of the body ?? I am hoping someone could point me in the right direction.

At the bottom is a snipet of my code. As you can see from the code that the line " oMailItem.Display(false);" is repeated twice. The first declaration is done because it displays the email itself and allows the signature in the email to be displayed. If this line is commented then you get an email with no signature but only hyperlinks. Which is not what i want.

I would really appreciate some assistance on this.

thanks
Vee

<code>
private void createEmail(object sender, System.EventArgs e)
{
string InternalPosting ="";
string PostingNotice ="";
string EmailBody="";
string sHtml="";

oApp = new Outlook.Application();
oNameSpace= oApp.GetNamespace("MAPI");
oNameSpace.Logon(null,null,false,true);
oOutlookFolder = oNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail);
Outlook._MailItem oMailItem = (Outlook._MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);

oMailItem.Display(false);

foreach (ListViewItem lvitem in listView3.Items)
{
int index = int.Parse(lvitem.Index.ToString()); string filename = EMAIL_ATTACH_LIST[index].ToString();
int lastindex = filename.LastIndexOf('\\');
string displayFilename = filename.Substring(lastindex+1, ((filename.Length) - (lastindex+1)));

sHtml = "<html>\n"+ "<head>\n"+ "</head>\n"+ "<body>\n"+
"<a href= "+"\""+InternalPosting+"\">"+displayFilename+"</a>\n"+
"</body>\n"+"<br>\n"+"</html>";

oMailItem.HTMLBody += sHtml;
}
oMailItem.Display(false);
}
</code>
GeneralRe: stuck on an annoying problem in outlook c# Pin
S. Senthil Kumar3-Jun-05 22:14
S. Senthil Kumar3-Jun-05 22:14 
GeneralRe: stuck on an annoying problem in outlook c# Pin
ekynox3-Jun-05 22:30
ekynox3-Jun-05 22:30 
GeneralExport to excel data from ultrawebgrid each row contain one worksheet Pin
sunilmskr3-Jun-05 19:32
sunilmskr3-Jun-05 19:32 
GeneralBeginner Question C# Form1 resizing Pin
...---...3-Jun-05 18:22
...---...3-Jun-05 18:22 
GeneralRe: Beginner Question C# Form1 resizing Pin
wout de zeeuw4-Jun-05 2:25
wout de zeeuw4-Jun-05 2:25 
GeneralRe: Beginner Question C# Form1 resizing Pin
MoustafaS4-Jun-05 4:29
MoustafaS4-Jun-05 4:29 
Generalset a cursor to the center Pin
Sasuko3-Jun-05 14:24
Sasuko3-Jun-05 14:24 
GeneralRe: set a cursor to the center Pin
Anonymous3-Jun-05 15:24
Anonymous3-Jun-05 15:24 
GeneralRe: Socket.BeginAccept woes... Pin
Valdair6-Jun-05 4:07
Valdair6-Jun-05 4:07 
GeneralWM_CopyData help Pin
savage_3-Jun-05 12:29
savage_3-Jun-05 12:29 
GeneralPostMessage() vs. SendMessage() Pin
jinzhecheng3-Jun-05 12:23
jinzhecheng3-Jun-05 12:23 
GeneralRe: PostMessage() vs. SendMessage() Pin
S. Senthil Kumar3-Jun-05 21:02
S. Senthil Kumar3-Jun-05 21:02 
GeneralRe: PostMessage() vs. SendMessage() Pin
jinzhecheng7-Jun-05 2:45
jinzhecheng7-Jun-05 2:45 
GeneralRe: PostMessage() vs. SendMessage() Pin
S. Senthil Kumar7-Jun-05 3:07
S. Senthil Kumar7-Jun-05 3:07 
GeneralRe: PostMessage() vs. SendMessage() Pin
jinzhecheng7-Jun-05 3:57
jinzhecheng7-Jun-05 3:57 
Questionhow see at the same time two active forms? Pin
Sasuko3-Jun-05 11:47
Sasuko3-Jun-05 11:47 
AnswerRe: how see at the same time two active forms? Pin
S. Senthil Kumar3-Jun-05 21:05
S. Senthil Kumar3-Jun-05 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.