F
Frédéric Laurent
Hello,
In Outlook, there is an option that says that a user can use Microsoft
Word as create/modify a message.
Because this user have a .dot file in his startup directory, he gets
some functions that was not intend for Outlook.
How can I detect with VBA that a macro runs in a Word document and not
in an Outlook message? ThisDocument.Parent, Application.AddIns.Parent
and Application.Name always return "Microsoft Word" either if it's a
document or a message.
Thank you for your advices!
Frédéric Laurent
Bonjour,
Dans Outlook, il y a une option qui indique qu'un utilisateur peut
prendre Microsoft Word pour créer/modifier un message.
Mais si l'utilisateur a un fichier .dot dans son répertoire de
démarrage (rép. startup), il peut exécuter des fonctions qui ne sont
pas prévues pour Outlook.
Comment puis-je détecter, avec VBA, qu'une macro s'exécute dans un
document Word et non dans un message Outlook ? ThisDocument.Parent,
Application.AddIns.Parent et Application.Name retournent toujours
"Microsoft Word" peu importe que l'on soit dans un document ou dans un
message.
Merci pour vos conseils.
Frédéric Laurent
In Outlook, there is an option that says that a user can use Microsoft
Word as create/modify a message.
Because this user have a .dot file in his startup directory, he gets
some functions that was not intend for Outlook.
How can I detect with VBA that a macro runs in a Word document and not
in an Outlook message? ThisDocument.Parent, Application.AddIns.Parent
and Application.Name always return "Microsoft Word" either if it's a
document or a message.
Thank you for your advices!
Frédéric Laurent
Bonjour,
Dans Outlook, il y a une option qui indique qu'un utilisateur peut
prendre Microsoft Word pour créer/modifier un message.
Mais si l'utilisateur a un fichier .dot dans son répertoire de
démarrage (rép. startup), il peut exécuter des fonctions qui ne sont
pas prévues pour Outlook.
Comment puis-je détecter, avec VBA, qu'une macro s'exécute dans un
document Word et non dans un message Outlook ? ThisDocument.Parent,
Application.AddIns.Parent et Application.Name retournent toujours
"Microsoft Word" peu importe que l'on soit dans un document ou dans un
message.
Merci pour vos conseils.
Frédéric Laurent