Quantcast
Channel: Outlook for Developers forum
Viewing all 6421 articles
Browse latest View live

Outlook Add-In - Office.context.mailbox.displayMessageForm no longer working in Desktop Client 2016

$
0
0

Hi guys - I have recently upgraded to Office 2016 (365) and have an Outlook Add-In that calls the JavaScriptAPI Office.context.mailbox.displayMessageForm(itemId) to open an existing item- this still works in OWA but has stopped working in the Outlook Desktop Client. I have debugged  in Visual Studio and the call is being hit consistently but nothing happens. This used to work in previous version - Office 2013.

Any advice on how to overcome this issue?

thanks!


Laurence Lemmon-Warde


MeetingItem objects

$
0
0

Hi,

I have following issue when raising PropertyChange event on aMeetingItem object:

When I forward some MeetingItem via e-mail and edit content of "To" field, I needPropertyChange event for  field "To" but this is not happening. Is this event possible to be raised?

This problem I have only for MeetingItem, while for both AppoitmantItem and MailItem objects this is working fine.

Reproduction steps:

1. I made some appoitmentItem

2. Open that appoitmentItem

3. Forward that appoitmentItem

 -> New window MeetingItem opens

4. Enter any email in the "To" field

Expected result: PropertyChange event for "To" property will be triggered

Actual result: There is no PropertyChange event for "To" property  

Thank you in advance!

Regards,

Drasko Krivokapic

Excel VBA avoiding the TITUS pop up box in outlook

$
0
0

Hi All,

I am using following code in excel 2010 to automate sending outlook email with pdf attachement.

Sub test()
Dim AOMSOutlook As Object
    Dim AOMailMsg As Object
    Set AOMSOutlook = CreateObject("Outlook.Application")
    Dim objUserProperty As Object
    'Const olMailItem = 0
    Dim OStrTITUS As String
    Dim lStrInternal As String
    Set AOMailMsg = AOMSOutlook.CreateItem(0)

    Set objUserProperty = _
        AOMailMsg.UserProperties.Add("TITUSAutomatedClassification", 1)

    objUserProperty.Value = "TLPropertyRoot=ABCDE;Classification=Internal;Registered to:My Companies;"

    With AOMailMsg
            .To = "sam.jac@bbb.com"
            .Subject = "New Report"
            .Body = "See attached PDF"
            '.Attachments.Add (AttachmentPath)
            .Save
            .Send
    End With

          Set AOMailMsg = Nothing

          Set objUserProperty = Nothing
          Set AOMSOutlook = Nothing


          Set lOMailMsg = Nothing

          Set objUserProperty = Nothing
          Set lOMSOutlook = Nothing


End Sub

The code works but eveytime Titus pop up prompts to select CLASSIFICATION (Internal or General business). My code automatically selects classification as "Internal"but I want code shall automatically click "OK" on that pop up.

Is it possible to do that using excel vba?

Thanks,

Zaveri





Checkbox on custom contact form works slower in Outlook 2016 64-bit

$
0
0

After updating Outlook 365 Pro Plus 64-bit to Outlook 2016 64-bit checkbox on custom contact form works slower. Checkbox is used for selecting mailing address. When checkbox is set it's text is filled with color and frame is "painted". What is the reason of slow work in Outlook 2016 64-bit?

Const ButtonFace = &H8000000F
Const ButtonShadow = &H80000010

Sub chkHome_Click
  If chkHome.Value = True Then
    chkHome.BackColor = CheckColor
    HomeFrame.BorderColor = ButtonShadow
    chkWork.Value = False
    If Item.SelectedMailingAddress <> olHome Then
      Item.SelectedMailingAddress = olHome
    End If
  Else
    HideSelection olHome
    If Not chkWork.Value Then 'галочка рабочего адреса снята
      Item.SelectedMailingAddress = olNone
    End If
  End If
End Sub

Function CheckColor
  CheckColor = RGB(224, 248, 146)
End Function

Sub HideSelection(olAddress)
  Select Case olAddress
    Case olHome
      chkHome.BackColor = ButtonFace
      HomeFrame.BorderColor = ButtonFace
    Case olBusiness
      chkWork.BackColor = ButtonFace
      WorkFrame.BorderColor = ButtonFace
  End Select
End Sub

How to open word file with task pan from outlook add-ins ?

$
0
0

I have a solution that has two project one is Outlook Add-ins and another one isWord Task Pan. So In my solution has two manifest projects one forOutlook Add-ins and another for  Word Task Pan. For both manifest file I referred same web project . For both projects has different view and logic.

When Outlook Add-ins run as default projec then work perfectly and When Word Task Pan run as default project  then also work perfectly.

My problem is When Outlook Add-ins set  as default project and run and click a button inOutlook Add-ins to open a word file from oneDrive then open that file inword but not shown Word Task Pan for that word file .

How can I open that word file with my Word Task Pan?

Open word file using javascript code. 

var url = "ms-word:ofe|u|" + "oneDrive doc url";
window.open(url, '_top', '', false);

 Help please

Select/Open email from the Drafts folder of a specific email account

$
0
0

Hello,

I'm very new to Office macro programming, and I'm learning "on the field" with every bit I try to achieve. So I'll appreciate your understanding. :-)

I have Outlook 2010, with 2 email accounts in the navigation pane on which I have admin rights.

Assuming there is an email (with specific subject and body pattern) sitting in theDrafts folder under email account #2, I would like my macro to open that specific email and prepare it to be sent: format it, add the TO and CC fields, etc...

Can you tell me how to select or open that email, based on its subject or body, so that I eventually get the relevantOutlook.MailItem?

Background: I have already created a macro that creates and saves that email in the Draft folder of email account #2.

Thanks a lot!

Chris.

SendUsingAccount Does Not Work in Outlook 2010, possible bug?

$
0
0

Hi,

I have been scratching my head for 2 days over this but it seems to me that there is a bug with Outlook 2010 where SendUsingAccount does not work. To be more specific SendUsingAccount does update the entry for the MailItem however the "From" entry in the display window does not get updated. Can anybody please confirm this bug?

C# Outlook Addin and context menu

$
0
0

hi,

I'm developing an outlook add in for 2010\2013 version, .net4.

i managed to add new Tool Bar in the main windows and in mail item.

my questions:

1. how can i add icon to existing toolbar like "Home" or "Add"?

2. how can i design the button so it will have big icon, now i have small icon and text on the side?

3. how can i add button to the right click menu when i right click on mail?

10x

Liran


outlook powershell

$
0
0

Sorry for my English

I want to make a script that will create a ".pst" file in an Outlook settings to do so in the default letter fell into the newly created ".pst"

Add-type -assembly "Microsoft.Office.Interop.Outlook"|out-null $oLFolders ="Microsoft.Office.Interop.Outlook.OlDefaultFolders"-as[type] $outlook =New-Object-ComOutlook.Application $namespace = $outlook.GetNameSpace("MAPI")$PSTPath ="C:\Temp\Example.pst" $PSTDisplayName ="Backup" $namespace.AddStore($PSTPath) $pstFolder = $namespace.Session.Folders.GetLast() $pstFolder.Name= $PSTDisplayName

That is part of the script, it creates the pst and points to his name and how to make that the default account for nearly into the pst. Knowledge I do not have, ask for help.

Prerequisites in Office for IM Application Integration

$
0
0

Hello, I have successully implemented an IM application integration for Office, following the documentation:

"Integrating IM applications with Office" (https://msdn.microsoft.com/en-us/library/office/jj900715.aspx)

On machines running Office 2013 Professional incl. Lync, it runs out of the box. On machines running Office 2016 Professional, it works as well.

But when our software is installed on a machine with Office 2013 Standard (without Lync / Skype), the integration does not work. I don't find the relevant dlls in the Office program files folder, Office does not invoke the interfaces of theUCCollaborationLib.

Question: What are the requirements for Office for enabling this feature? Is there any redistributable that I could include in the installer?

The documentation only reads: "The APIs for this integration are included in the UCCollborationLib namespace that is contained in the Microsoft.Office.UC.dll file, which is installed with certain versions of Office 2013."

Wolfgang


Strange white line below table row in Outlook html body

$
0
0

I am developing a vsto add-in, which actually edits the content of the mail body.

Whenever I try to insert a html table in the mail body programatically, I see a strange line of 1px height below the table row, which has background color set. This happens only if there is a border on my table. If I remove the border, the issue is no more! I tried a lot of solutions mentioned in stackoverflow, and other forums, but none of them work.

I tried to set `border-collapse: collapse;` inline css on TDs. But it ended up hiding all the borders I had.

Is there any way to solve this issue. This has been extensively reported in MS Outlook. Also, is it a bug on MS Outlook?

Regards, Kiran



Can i Disable\Enable inline response buttons (preview pane buttons Reply/ReplyAll/Forward) for Outlook 2016?

$
0
0

I'm creating Outlook Addin.(C#)

How can I disable\endable Explorer inlineresponse buttons for Outlook 2016 (Reply/ReplyAll/Forward).


In Outlook 2013 background GUI was different. This buttons was a part of Toolbar (windowtext property was "dal=on"), toolbar has handle and it allows to manipulate buttons enable\disable state using WinAPI.

But in Outlook 2016 toolbar was replaced to different controls.

Now it's:

panel (has handle)

grouping control (has no handle)

buttons (has no handle)

I found this information using UI Automation classes.

Please suggest any way how can i manipulate enable state of this buttons.

May be exist other direction where i can found solution.

Thanks for any responce.

Why is Location = mscoree.dll displayed for my add-in in Outlook Options->Addins?

$
0
0

Why is Location = mscoree.dll displayed for my add-in in Outlook Options->Addins?

I would like it to display the full Program Files path to my add-in's DLL.

Creating draft emails in another users profile using Microsoft.Office.Interop.Outlook: C#

$
0
0

I am trying to create draft emails in another profile while no other profile or instance of outlook.exe is running.  I pass in 

a profile name (m_profileName) as a parameter.  It still only creates the draft emails for my profile, even though I specify a different profile.  I have made sure outlook.exe is not in task manager and that outlook is not running.  Is there a different way to accomplish what I am trying to do using the code below or can it not work this way.

 if (Process.GetProcessesByName("OUTLOOK").Count() > 0)
            {

                // If so, use the GetActiveObject method to obtain the process and cast it to an Application object.
                application = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application;
                Console.WriteLine("FOUND OUTLOOK PROCESS RUNNING");
            }
            else
            {

                // If not, create a new instance of Outlook and log on to the default profile.
                application = new Outlook.Application();
                Outlook.NameSpace nameSpace = application.GetNamespace("MAPI");

                try {
                nameSpace.Logon(m_profileName,Missing.Value, false, true);
                }
                catch(Exception e)
                {
                    Console.WriteLine("THIS FAILED TO LOGON TO PROFILE" + e.StackTrace.ToString());
                }
                //nameSpace.Logon.Outlook = "reporting";
                //   nameSpace = null;

                Console.WriteLine("CREATED NEW INSTANCE OF USER => " + m_profileName);

Integrating IM applications with outlook 2013, user's presence not enabled in Contact Card

$
0
0

I have implemented the IM Client (32 bits) for Outlook 2013 (64 bits) as per article "https://msdn.microsoft.com/en-us/library/office/jj900715.aspx?f=255&MSPPError=-2147217396".
I have implemented the COM class by UCOfficeIntegration. Below link has one example as well and my class implementation is working well with this example. Link:_IContactsAndGroupsCallback.OnLookUp

Outlook is calling below APIs to IM Client and IM Client is also responding with valid data. But Outlook couldn't enable the user's presence with chat, audio call, video call in Outlook Contact Card.

Called APIs from Outlook to IM Client? 
IContactManager.GetContactByUri
IContact.CanStart
IContact.GetContactInformation
IContactManager.CreateSubscription
IContactSubscription.AddContact
IContactSubscription.Subscribe
IContact.BatchGetContactInformation
IContact.Settings 

If these APIs are called from Outlook then why Outlook is not enabling/updating the user's presence in Outlook Contact Card? 
Will anybody please help to resolve this issue?



MailItem.SenderEmailAddress for an encrypted email, I get this exception

$
0
0

When I call MailItem.SenderEmailAddress for an encrypted email,

I get this exception: "your digital id name cannot be found by the underlying security system".

Why I get this exception and what to do to avoid it? 

best regards
Thomas


Thomas Lauer

Outlook add-in > How to know if all the invitees have accepted the meeting request?

$
0
0

Hello,

I am developing an Outlook add-in for Office 2010/2013/2016. The requirement is to send an automated email to BOSS if "All the invitees to the meeting" have accepted the meeting request.

Can someone guide me on how to identify if all the invitees have accepted the meeting request or what are the possible ways to do this?

Thanks,


-Vinay Pugalia
If a post answers your question, please click "Mark As Answer" on that post or"Vote as Helpful".
Web : Inkey Solutions
Blog : My Blog
Email : Vinay Pugalia


Get Detailes of read message item

$
0
0

hi

i'm developing addin for outlook 2010\2013, .net4.

i can get MailItem stuff for selected mail, like this:

Microsoft.Office.Interop.Outlook._Application oApp = new Microsoft.Office.Interop.Outlook.Application();
Object selObject = oApp.ActiveExplorer().Selection[1];


            if (selObject is Microsoft.Office.Interop.Outlook.MailItem)
            {
                Microsoft.Office.Interop.Outlook.MailItem mailItem = (selObject as Microsoft.Office.Interop.Outlook.MailItem);
                lblMailSubject.Text = mailItem.Subject;
            }

i need to get the info from the readMailItem, so if i have several readMail windows open and i start my addin i want to get the current readMailItem that is open not the main windows selected MailItem.

10x

Liran

Moving into Folders.

$
0
0

Can someone please assist in revising this code to work on emails labeled with a specific category, for example "Johny".<o:p></o:p>

I have a macro that labels the emails with category "Johny", and would be great if I could move them into folder "JohnysEmails" without selecting each one inside the box.<o:p></o:p>

 

Thank you very much!<o:p></o:p>

Sub AutoForwardMove()
On Error Resume Next

Dim ns As Outlook.NameSpace
Dim moveToFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem

Set ns = Application.GetNamespace("MAPI")

'Define path to the target folder
'Set moveToFolder = ns.Folders("Mailbox - Jim Merrell").Folders("@Filed")


Set moveToFolder = ns.Folders("Mailbox - Vlad").Folders("Johny")


If Application.ActiveExplorer.Selection.Count = 0 Then
   MsgBox ("No item selected")
   Exit Sub
End If

If moveToFolder Is Nothing Then
   MsgBox "Target folder not found!", vbOKOnly + vbExclamation, "Move Macro Error"
End If

For Each objItem In Application.ActiveExplorer.Selection
   If moveToFolder.DefaultItemType = olMailItem Then
      If objItem.Class = olMail Then
         objItem.Move moveToFolder
      End If
  End If
Next

Set objItem = Nothing
Set moveToFolder = Nothing
Set ns = Nothing

End Sub

VBA Script Outlook - Determine if to forward another message to user

$
0
0

Hi Guys,

I am pretty new to VBA but am currently using outlook spy to dermine a method to look at a folder and determine when the last forward was sent just in that specific folder. Is this possible?

I am going to be having messages sent to an email which will be organized from subject lines to different folders once the email arrives I am going to have it forwarded to a specific user/users, I am thinking each group will have there own folder.

What I would like to do is then check to see if an email has been sent in the last 30 minutes and not forward during that timeframe just so they don't get spammed any incoming emails during those 30 minutes can be skipped and then after that time frame the next one to come into the folder needs to be forwarded again.

Just wondering if anyone knows if there is a Property that I can look into further to try and make myself a solution. Any direction is much appreciated :)

Thanks,

Andrew

Viewing all 6421 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>