Press ctrl+6 in Outlook and look at the hierarchy of folders and their names. You´ll find the same hierarchy in Application.Session.Folders("[here the topfolder name]".Folders("[here the subfolder name]")
Only the address is in quotation marks. For FolderType you need to specify which type of folder should be opened: place the cursor onto the word 'FolderType', press ctrl+switch+j, then select the type you need.
Also, move the item before you display it.
The email address must be enclosed in quotation marks.
And you need to move the item to the target folder, that is after loading the template call:
set newitem=newitem.move(calendarfolder)
CreateItem`adds the item to the default calendar, which for your collegue is not yours. Call GetSharedDefaultFolder, and move the item to that folder. See a sample for how to use that function in the VBA help file.
Not sure what you mean by an "email calendar". If that´s a shared calendar of another mailbox, you´d get it by calling Application.Session.GetSharedDefaultFolder. See the VBA help file for how to use pass user to that function.
When done, call Application.Explorers.Add and pass to it the folder...
I could never figure when that function works and when it doesn´t. I´d use the Items.Find function of the contacts folder and search the email address myself.
I think you need to rely on your memory. You cannot rely on the LastModified date since it gets changed just by clicking the Save button even it there´s no change.
This is what I do: I have a folder on the desktop where I keep all single files (classes, modules, forms) from the VBA project...
Are you sure the ConversationID doesn´change? Since it´s computed, I´d expect it to change, too, when the topic is changed.
BTW: The Outlook object model doesn`t allow to change the topic, you´d need to dig deeper. And changing the subject has no effect on the Conversation.
Your way called the Remove method of the MailItem object, my calls it for the Items object. I´ve no clue why the MailItem doesn`t support it for this type of MessageClass.
If you need the item in "ManualInbox" and if Copy works, you could first copy the item to the target folder, then delete...
So you have two issues, 1) get the filter working, and 2) get the result displayed.
The object browser is a great source of help. Press f2 in the VBA environment, then switch from <All Libraries> to Outlook. Select Items left hand, and its Restrict function right hand. Press f1 for help...
It´s the ".Move oManualInbox" line that throws the error? Is the 0ManualInbox variable declared as Folder?
If the Copy command would work, I´d try to call Items.Remove intI
The Restrict function returns the items matching the filter, it doesn´t change what is displayed in the folder. You´d have to use an MSForm with a listview control on it to display the items yourself.
Maybe you´d get better answers if you´d share details. We still don´t know which versions of outlook you want to support. If using NewForma´s Send button instead of Outlook´s button is important, NewForma really could be interested in overwriting Outlook´s button as mentioned. Did you ask them...
Looking for what? If you only need to support Outlook 2010 and older, that would be easier. If 2013 and up, what language would you be using, do you have Visual Studio for creating an Addin? If you don´t have any experience in creating and deploying Addins, I´d first ask the vendor of NewForma...
Do you mean you open a linked contact from within a task item and then it displays the contact with the standard form?
If so, does it use the custom form if you open the contact directly, or did you just test with a new contact? If the first I`d guess it´s not the same contact but a copy in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.