Can't delete mapi properties created through microsoft graph open extensions into outlook contacts - outlook

I have created a script using powershell that uses open extensions, but I didn't know there was a limit to how many open extension types(MAPI properties) I could use. Now I have reached the limit and I can't create anymore mapi properties without deleting the properties I have made previously. But I am unable to figure out how to delete thos properties.
Thanks for your help!!! :)
I have figured out a way to see them with MFCMAPI but not to delete them.
MFCMAPI Interface with some of the properties I have created

Once you ran out of the 65k named properties limit (the total number of mappings in a given store), your mailbox is pretty much kaput. Once a guid/id is mapped to a property tag, it cannot be unmapped.
Creating a new mailbox is pretty much the only option.

Related

Powershell Script to Create Outlook 2019 Personal Folder

Currently users have their own inbox folder and due to corporate policy emails will automatically be deleted after a set period of time.
Some emails however users would like to be able to keep for reference.
In order to accomplish allowing users to keep their importasnt emails; a personal folder file .pst needs to be created. The deletion policy will on affect the exchange profile folder that they currently use. This special personal folder should not be touched by the corporate system.
I need to be able to run a powershell script to automatically create this folder for the user (logged in user on the computer) and assign it in outlook 2019 for use, the user will then copy their specific emails into that personal folder. If I can't do it for the current logged in user - then by a collection of usernames and put in their one drive folder ??
Anyone with knowledge of how to or code to do this, I would appreciate your help - while I can code - I'am not a Powershell Guru so specifics and functions that experts might know exactly - I do not know, so please in your answer provide good guidance.
I am using windows 10 .1909 and the powershell version that ships with it.
The Outlook object model provides the AddStoreEx method which adds a Personal Folders file (.pst) in the specified format to the current profile.
Sub CreateUnicodePST()
Dim myNameSpace As Outlook.NameSpace
Set myNameSpace = Application.GetNamespace("MAPI")
myNameSpace.AddStoreEx "c:\" & myNameSpace.CurrentUser & "\.pst",olStoreUnicode
End Sub
After creating additional storage in the Outlook profile users can move items for keeping them locally. Or you may consider creating a VBA script or COM add-in for doing that programmatically. See Walkthrough: Create your first VSTO Add-in for Outlook for getting started quickly.

How to create Global Address List folder in Outlook programmatically?

I have Outlook plugin (written with Visual C++) which syncs contacts with DAV server (which acts as a replacement to Exchange). Personal contacts are fine but I don't know how to mimic the behavior of Global Address List (GAL).
Ideally, I want to create GAL folder the user will be able to search just like how it happens when Outlook is connected to Exchange. Is it possible at all? Perhaps, it's not possible with Outlook Object Model but still possible with MAPI? Can anybody point me in the right direction on how to start?
I need to support Outlook 2007+ but supporting only the newest versions (for this particular functionality) is an option, too.
Originally, I just synced the entire GAL folder and made it read-only so that Outlook stored the local copy of the entire GAL. This does not work well when the GAL size stretches to thousands of records.
You cannot do that - the address book provider can tell Outlook to only allow searches and never display the actual contents of the container.
You cannot do that with an Outlook folder unless you create your own MAPI store provider: then you can return any data you want depending on what the user is doing.

Custom folder field for windows 7

I would like to be able to add a custom field to folders in windows 7, and then be able to show that column(field) when viewing the folder in explorer (sort and group etc).
Question:
How can I achieve this? (is there a program I can buy / use or is there a way of doing this in windows 7?)
Example use case: I have folders for each job that I do - I'd like to mark the folder as "pending", "done" etc. I'm using custom folder markers at the moment - but that's limited. Having a number of these fields would be really powerful.
Basically, you need to create a new Windows Property. See Windows Property System at http://msdn.microsoft.com/en-us/library/ff728898(VS.85).aspx. I do not know of any program that allows you to create properties.
Moreover, see Creating Custom Properties at http://msdn.microsoft.com/en-us/library/cc144135(VS.85).aspx.
Here is an MSDN search for "Windows Property System" to get you started (http://social.msdn.microsoft.com/Search/en-US?query=%22Windows%20Property%20System%22)
Note, that Windows Runtime (WinRT) will make handling this properties fairly easy.
See: http://blog.rodhowarth.com/2008/06/how-to-set-custom-attributes-file.html
It appears using the DSOFile DLL from Microsoft you can add custom attributes to a file as long as it is on a NTFS.
However re-saving some file types depending on how their applications handle it - may strip the previously added custom property.
I think, you are just being silly, this will quickly overwhelm you with information overload,
you should simply instead of adding columns, just create folders and dump every folder you need inside it like so,,,
> - Pending
> - client 1
> - client 2
> - Done
> - client 3
lets, say you have finished with client 2 you just drag and drop it on the Done folder, or cut, and paste it on done,
easier to manage,
here is a something, I stumbled across, I think its alot more difficult to manage eitherway, your better off using excel, or simply the structure I mentioned above.
http://rkeithhill.wordpress.com/2005/12/10/msh-get-extended-properties-of-a-file/
hope this helps somehow.

Find the relation between ".automaticDestinations-ms" and it's file?

Does anyone know (Because on microsoft forums nobody answered me), how can I find what app has which automaticDestinations-ms file in %appdata%\microsoft\windows\recent\automaticdestinations ?
That's the folder where Windows 7 stores its jump lists, and I want to know how to automatically/programmatic find the relation between each file and an application.
At least, even manual I didn't found any pattern, just to look after file extensions in the files, because some programs open files with the same extension (like images), so this method it's not OK for all programs.
Do you have any other idea? Maybe knowing the format of those files?
Thanks.
the GUIDs appear to persist.
I was trying to edit my control panel jumplist - I found where the "Realtek HD audio manager" control-panel-applet-title-string is (using resource hacker on "C:\Windows\System32\RTSnMg64.cpl"), and restored it's original title ("Dell Audio" - 'cause I'm OCD:) but the original pinned Realtek entry is stuck.
A quick filesearch for pinned took me to
C:\Users\Jonny\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned
but I really needed to be # C:\Users\Jonny\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations
If you use something like Nirsoft's Jumplist View you can see the entries etc. Sort by "application ID" column to see jumplists by application. You can even change the monitored folder (advanced options).
I'm going to have to delete and recreate my control panel jumplist (7e4dca80246863e3.automaticDestinations-ms).
TIP: If you're not sure which is which, try pinning a new jumplist-entry to an application. This will appear at the top (if sorted by "record time")
The best way to find out is to sort the files by date modified, then interact with your machine, eg open a file with Powerpoint, look and see what file moved to the top. That is probably the file for Powerpoint, which you can confirm by opening it and looking in it.
Then you could build a table of magic guids, and search for those in the registry to see if there is an obvious key connecting the guid to an application id.
Here is a list of 620 applications here with the corresponding App ID byEricZimmerman
https://github.com/EricZimmerman/JumpList/blob/master/JumpList/Resources/AppIDs.txt
eg 0a1d19afe5a80f80|FileZilla 2.2.32
last update 12 days ago

Outlook MailItem opened from standalone file, or not?

I'm developing an Outlook addin in C# and have a problem distinguishing mails opened from a folder (Inbox, Sent etc) from mails opened from a standalone .msg file.
I've tried inspecting the Parent property, but it shows Inbox for both kinds.
Any ideas out there?
/Sam
Looking through the properties, it looks to me that the .EntryID property is blank if the MailItem is opened from the file system, and has a value if the file is opened from within a folder. This makes sense based on the help entry for it; one caveat is that you'd also expect this property to be blank if the message is a new message (i.e. hasn't been saved in a folder, but doesn't exist in the file system either).
From the help concerning blank values:
Therefore, the EntryID property is not
set for an Outlook item until it is
saved or sent
You'd want to experiment with it and make sure it definitely behaves correctly before you implemented it :)
Failing all THAT, the next step could be complex; one approach would be to inspect the handles opened by Outlook. Inspecting them (in a non-priveleged context) via Process Explorer shows that there is a handle for each message; the name of the handle matches the message subject, the path is the file's path. One solution to enumerate these is in this answer.
HTH,
Geoff

Resources