|
I did research almost erevry site including microsoft but found no luck to my perticullar problem.
So please help if you can
Thanks,
Asif
|
|
|
|
|
Add a reference to the MSHTML.dll and cast to the DOM types as explained in some document you read (you said you did them all). Then simply use the DOM to get the values.
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
Thanks for your help! I am trying DOM but don't seems to work for me, can you please show me or send me some sytax how to get this values. I'll really apreciate your help.
Thanks
Asif
|
|
|
|
|
Hi Guys. I have a very stupid/simple question for you. I have two forms in my project, one a logon form called from my main form. When the user enters his username on the logon form I want to move the username into a label on my mainform. Can somebody please advise me on how to do this?
Thanks in advance.
|
|
|
|
|
|
I am using backgroundworker thread in my application... i need to track each background worker and need to show the status in a datagrid ...
my application is used for database administrating ...
backups
restore
attaching
so various activities are going in different background workdes and their status need to show on a datagrid ... and each row in the datagrid should updated correctly ....
can someone write a small piece of code ....
thankzzzzzzzz
A123-B321
|
|
|
|
|
Have your background threads fire events for different states. Then your UI thread can listen to those events and respond appropriately.
You can also poll the status of the background threads by keeping track of the object reference, however, the event model is easier.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
You can use ProgressChanged event of the backgroundworker component to report progress
|
|
|
|
|
can you just write a small piece of code to update the activities into a datagridview ....
i mean, if i am click on a button control to run backup activity and it will update into a datagrid row as dbname, backup going on and when i click again on same button control and it need to appear in the grid as second row ... with dbname, backup going on ... .and when the first thread completes, the grid first row need to update with dbname, backupcompleted ... how could i do this ... please write a small piece of code ...
A123-B321
|
|
|
|
|
Hi I am writing an application which retrieves your outlook contacts.
Right now I am able pop up the contacts window of the Outlook, but I want the specific fields to be printed in my checkedlistbox
I used the following code to pop up the contacts window. Now I want to get he name+last name and the fax number to printed in my chckedlistbox. But I cant find the object under OutlookItems to print the whole contacts list. Any Help?
try
{
Outlook.Application oApp = new Outlook.Application();
// Get the NameSpace information.
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
// Log on by using a dialog box to choose the profile.
oNS.Logon(System.Reflection.Missing.Value, System.Reflection.Missing.Value, true, true);
// Get the default Contacts folder.
Outlook.MAPIFolder oContacts = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
// Get the Items collection from the folder.
Outlook.Items oItems = (Outlook.Items)oContacts.Items;
// Get the first contact item in the Items collection.
Outlook.ContactItem oCt = (Outlook.ContactItem)oItems.GetLast();
string faxNum;
faxNum = oCt.BusinessFaxNumber.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "");
this.txtRecipientFax.Text = faxNum;
// Display the contact.
//oCt.Display(true);
|
|
|
|
|
s3rro wrote: But I cant find the object under OutlookItems to print the whole contacts list.
They hide that information in the documentation[^]
|
|
|
|
|
I read the document.
I can get the first/last contact. I tried most of them to list the whole Outlook Contacts, list none worked, thats why i asked it here.
Thanks
|
|
|
|
|
s3rro wrote: I tried most of them to list the whole Outlook Contacts, list none worked
I have no idea what that means ????
|
|
|
|
|
Ok,
When i run the code with getLast or getFirst "(Outlook.ContactItem)oItems.GetLast();" everything is good, it pops up Outlook contacts window with the last contact in the list. But you are not able to go up and down on your contacts list.
Normally when you open the contacts window from the Outlook you are able go up/down to check the other contacts.
Now i am looking for the object to view the "main outlook contacts window" or a way to print the whole outlook contacts to a textbox (with whatever i need from the contacts name+lastname phonenumbers) I have in my application.
|
|
|
|
|
s3rro wrote: Ok,
When i run the code with getLast or getFirst "(Outlook.ContactItem)oItems.GetLast();" everything is good, it pops up Outlook contacts window with the last contact in the list. But you are not able to go up and down on your contacts list.
Normally when you open the contacts window from the Outlook you are able go up/down to check the other contacts.
Now i am looking for the object to view the "main outlook contacts window" or a way to print the whole outlook contacts to a textbox (with whatever i need from the contacts name+lastname phonenumbers) I have in my application.
I have no idea what you mean as I have not read the documentation. But, I would image that it would require some iteration to get every single contact from the address book.
I would think something like:
for(int i = 0; i < (oItems.Items.Count; i++)
{
Console.WriteLine(string.format("Contact {0}'s name is: {1}", i.ToString(), oItems.Items[i].ContactName));
}
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
s3rro wrote: But you are not able to go up and down on your contacts list.
What does that mean? State your problem specifically, can you do that?
|
|
|
|
|
ok, In outlook when you open your contacts ( go>contacts or ctrl+3)
then click on a contact on the new window you have up/down arrows to go to the previous and the next contact.Those buttons do not function when i open the contacts window with
"Outlook.ContactItem oCt = (Outlook.ContactItem)oItems.GetLast();"
or
"Outlook.ContactItem oCt = (Outlook.ContactItem)oItems.GetFirst();"
then I planned to print my whole outlook contacts to checkedtextbox in my application but couldnt find the what the "Outlook - whole contact list" is called to print it to my textbox.
up/down buttons on the contacts window is = previous and the next item from the contacts list.
Thanks for your help in advance
|
|
|
|
|
s3rro wrote: ok, In outlook when you open your contacts ( go>contacts or ctrl+3)
then click on a contact on the new window you have up/down arrows to go to the previous and the next contact.Those buttons do not function when i open the contacts window with
"Outlook.ContactItem oCt = (Outlook.ContactItem)oItems.GetLast();"
or
"Outlook.ContactItem oCt = (Outlook.ContactItem)oItems.GetFirst();"
then I planned to print my whole outlook contacts to checkedtextbox in my application but couldnt find the what the "Outlook - whole contact list" is called to print it to my textbox.
up/down buttons on the contacts window is = previous and the next item from the contacts list.
I think I understand what you want to do. You want to add every contact from your list to a checked-text box. Create a "contact" object. Then iterate through the items in the object, strip out what you want/need and add it to your controls. Is that what you want to do?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Yes thats what exactly I want to do.
I want to strip out the parts that i dont need from the Outlook Contacts. I ll keep the name+last name and phone number fields and print it to a checkedlistbox in my application.
Thank you
|
|
|
|
|
Ah I see now. See led mike's post below, he posted a link showing how to do exactly what you want to do.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
s3rro wrote: but couldnt find the what the "Outlook - whole contact list" is called to print it to my textbox.
Ah.... see this[^]
|
|
|
|
|
Thanks the link was very helpful.And right now im able get the number of the contact in my outlook.
Now i want to list them in a checkedListBox. How can I do it?
this is what i used to retrieve the number of Outlook contacts.
Outlook.MAPIFolder foldercontacts = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
Outlook.Items searchFolder = foldercontacts.Items;
int counter = 0;
foreach (Outlook.ContactItem foundContact in searchFolder)
{
counter = counter + 1;
//foundContact.FullName.ToString();
}
MessageBox.Show("You have" + counter + "contacts" );
thanks in advance
|
|
|
|
|
I have created a XML view application with a few other things in it and am I now more or less 'done' but i just found out you can't resize it. I have 'locked' set to false on my Form but it still wont let me resize
|
|
|
|
|
Check that the FormBorderStyle is set to Sizable
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|