Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change visibility of Outlook MailItem? #251

Open
DanielKarr87 opened this issue Aug 20, 2019 · 1 comment
Open

How to change visibility of Outlook MailItem? #251

DanielKarr87 opened this issue Aug 20, 2019 · 1 comment

Comments

@DanielKarr87
Copy link

DanielKarr87 commented Aug 20, 2019

tl;dr-Version:

  • using NetOffice latest (as of today, 2019-08-20, version 1.7.4.6), Outlook API-Wrapper
  • programming with Visual Studio 2013, writing in C#, using .NET Framework 4.0 (not 4.5, or newer, just 4.0)
  • searching for solution to "hide" olMailItem after .Display()-Function executed or to apply formatting and Signature to Mailbody without Interaction with User
  • appreciate for any help =)

Long Message:
Hello,
I recently had the problem, that my Outlook Mailitem hasn't got the formatting and Signature which an Mailitem has when directly opened by Outlook itself.

After getting rid of this annoyance by using objMailItem.Display(false); the formatting was applied and the Signature was also inside the mail as requested.
However, after executing this line of code, the Mailitem pops up and every Interaction, done programmatically is shown to the user which should be able to "hide" somehow.
I don't find any "hide"-Function for making the Mailitem-Window invisible to the user.

For example, when sending Mails in bulk (100+ Mails to customers), feeding the program from an external application would cause 100+ popups and closes which look annoying.

Without using the objMailItem.Display(false);-Line NetOffice-OutlookAPI sends the Mail without any Window to pop up, but with no Formatting or Signature applied.

I'm searching for a Solution, which let me add Formatting from my Default Outlook Mailitem, Adding the Signature but doesn't interact with the user - it should be done silent in background.

Maybe i'm blind or doesn't know the exact term how its called what i used, hoping for someone who could help me with this problem. Or maybe i'm using it "wrong".
All i need is an olMailItem with my Message but formatted in the Standard Font definition the user has applied for any other Mail and with his Signature after the Message.

Thanks in Advance,
I am looking forward to a quick help and been grateful for your answers.

@jozefizso
Copy link
Member

As NetOffice wraps the MS Office automation API, any calls you do are reflected in the user interface. In many cases, this behavior cannot be changed as you are effectively automating stuff which could be otherwise clicked by on the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants