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

ItemSend not firing for outlook 2010 - Security is Low

$
0
0

I am very new to Outlook macro writing but am experienced with vb in general and hope someone can see something obvious that i am missing.  I have created a simple event handler that should be fired when sending a message but it does not seem to be working.   The project is self signed and the security trust is set to low (Enable all macros).  Breakpoints inside the application are not caught either when ran.  Could there be anything else needed to get the event to fire? The code i am using is below which is inside of a Class Module:

Public WithEvents myOlApp As Outlook.Application
 
 
 
Public Sub Initialize_handler()
 
 Set myOlApp = Outlook.Application
 
End Sub

Private Sub myOlApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim recips As Outlook.Recipients
    Dim recip As Outlook.Recipient
    Set recips = Item.Recipients
    For Each recip In recips
        
        MsgBox (recip.Name & " SMTP=" _
           & recip.Address)
    Next
End Sub

Thanks for any help!


Capture theme change event in Outlook

$
0
0

Hi,

I need to capture theme change event in outlook. I did not find any event related to theme change. Is it possible to do this?

I need it because few controls does not update themselves when outlook theme changes. For example, I have created a custom task pane which has tab control in it. When I change outlook theme then background color of tab control does not get updated until I restart my outlook.

Is it possible to capture theme change event in outlook in general and to be precise , update custom task pane (with all its children) on theme change?

Office look and feel for forms in AddIn

$
0
0

Is there any way to get look and feel of currant outlook theme to windows form in Addin, I found third party libraries provide skins (devExpress or telerik). But I can not use those,

1. I have to buy them

2. Addin will be heavy.

Or Can I use WPF (less knowledge) without third party libraries?

And what is the use of outlook form regions?

Better can find solution using windows forms. (VS 2012, .net4, office 2010-outlook)

Thank


chapneox

Resolving recipient & get user info when exchange connection is down

$
0
0

Hi,

i have a situation, in my addin in order to get the current user info, i am using this

dim CurrentUser as string

dimOutlookNS As Outlook.NameSpace

OutlookNS = Application.GetNamespace("MAPI")
CurrentUser = OutlookNS.CurrentUser .Name

now, when there is no exchange connection (due to internet connection down), OutlookNS.CurrentUser can not be resolved and addin throws an error "Exchange connection is not availbale." which is obvious.

Similarly, a recipient can not be resolved if exchange connection is down.

Is there any work around that i can use so that addin can get this information locally, instead of connecting to exchange?

Also, is there are any other outlook com object other than CurrentUser and Recipient, which will not retrieve information if exchange connection is down?

i know this not an ideal situation, but some time if we have to give demo where internet connection is not available.

Thanks

Get unpredictable values - ConversationIndex

$
0
0

Hello folks,

As a rule, you can find my name answering questions here. But now I have to ask other community members or Microsoft representatives. 

The ConversationIndex property of Outlook items returns a string value that indicates the relative position of the item within the conversation thread. Under the hood it is represented by the GUID with further timestamps. Each time a user replies to a message (send it), a new timestamp is added (the last five bytes). Here is what it should look like:

 

0100010203040C2777CD0E3A3DDBF1D621F1C21B7FF8

0100010203040C2777CD0E3A3DDBF1D621F1C21B7FF800CB3F74FB

0100010203040C2777CD0E3A3DDBF1D621F1C21B7FF800CB3F74FB0070AC33AB

0100010203040C2777CD0E3A3DDBF1D621F1C21B7FF800CB3F74FB0070AC33AB001E4E9CEE

 

But sometimes I see the following picture:

 

0101914972D428D091C0DF319BA1A5F5833A3E0C5392

0101914972D428D091C0DF319BA1A5F5833A3E0C53929B2DBDA740

0101914972D428D091C0DF319BA1A5F5833A3E0C53920194CA7EEC028E938537

0101914972D428D091C0DF319BA1A5F5833A3E0C53920194CA7EEC028E9385379B0E100950

0101914972D428D091C0DF319BA1A5F5833A3E0C53920194CA7EEC028E938537021880A4BC01859D07F9

0101914972D428D091C0DF319BA1A5F5833A3E0C53920194CA7EEC028E938537021880A4BC01859D07F99AF1E1B7E0

Is there a bug somewhere? Does anybody know why I get unpredictable results?

 

Simulate Outlook "Copy" Function for Item(s) using WinAPI/SetClipboardData

$
0
0

Dear All, 

I wonder if anyone can provide any info on this...any help/info/guidance greatly appreciated;

In the Outlook UI, right-clicking above most Item(s) allows selection of a "Copy" context menu item; the Item(s) copied can then be Paste-ed, either within Outlook or in any WindowsOS folder. Analysing the various formats which appear in the Clipboard after such a "Copy" operation, for a single email, using the vb.net function

Clipboard.GetDataObject.GetFormats()

reveals the following formats (in order): RenPrivateSourceFolder, RenPrivateMessages, RenPrivateItem, FileGroupDescriptor, FileGroupDescriptorW, FileDrop, FileNameW, FileName, FileContents, ObjectDescriptor, System.String, UnicodeText, Text, CSV.

I'd like to replicate/simulate this "Copy" operation programmatically/in code within an OL add-in, if at all possible. Unfortunately, the nature of the add-in is that the folder(s) in question, and the items they contain, are not viewable in the Outlook UI - they are only viewable via a UI component of the Add-in, and therefore the simple Context-based "Copy" operation above is not an option.  Naturally, within the Add-In, I can only obtain references to System.__ComObject(s) representing the Outlook.MailItem and other Item types.

Although there are many great articles on extracting Outlook mail (and other) items from the Clipboard, and very useful tutorials on how to implement Drag/Drop for Outlook items (e.g.http://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C), there are few articles on programmatically Copying entire Outlook items to the Clipboard.

Is it possible ?

Many thanks in advance for your comments/suggestions,

jim

 

Compete with the Market Share

$
0
0

Hello Microsoft.

Is it possible for you to compete with the open source applications like ThunderBird? Even though you do not hold the market share you dominate development time with broken and inferior products that you charge money for. Since your development budget is boosted by the funds provided by those that do not know any better is it possible that you could get your software up at least to the standard from 5 years ago set by the open source programs to save companies money on development and provide an ethical business example rather than trying to profit through exploitation?

Thanking you in advance for your efforts to compete with free software.

__a Concerned Developer

BUG: ATL Implement Interface Wizard always prompt error?

$
0
0

I was struding guide in http://msdn.microsoft.com/en-us/library/ee941475(v=office.14).aspx.

But vs2013 always prompt error by ATL Implement Interface Dialog.Can Any body help me? Thankyou very much!

Because of 

  • Body text cannot contain images or links until we are able to verify your account.

I can't insert that error image.

The error message:

----------------------------------------------------------

---------------------------
Microsoft Visual Studio
---------------------------
An error occurred while setting the error info.
---------------------------
OK   
---------------------------
---------------------------
Microsoft Visual Studio
---------------------------
Error in OnFinish: Failed to return new Code Element. Possibly syntax error. New Element Name: _IDTExtensibility2
---------------------------
OK   
---------------------------


Proper use of Function

$
0
0

Hello,

  • I have a perfectly working piece of code in the ThisOutlookSession that traps when the user is sending an email with aApplication_ItemSend in order toadd a characteristic to all sent emails at the beginning of the subject (P- for Product,S- for Service).  From ThisOutlookSession I call the AddCharacteristic function which in turns make use of the UserForm to do it.

I have a couple of questions:

  1. I was told that The ItemSend event is not a suitable place for displaying any dialog windows (userForm) because they block the UI thread. Is this the case and do you see a problem with the implementation below?
  2. Do I make right use of Function in Modules?
  3. Does the Function has to contain error handler as the ThisOutlookSession?

In Forms: TheEmailCharacteristicFormexists

' Characteristic : Product

Private Sub CommandButton1_Click()

  Dim Item As MailItem

  Set Item = Outlook.Application.ActiveInspector.CurrentItem

  Item.Subject = "P- " + Item.Subject

  Unload Me

End Sub

' Characteristic : Service

Private Sub CommandButton2_Click()

  Dim Item As MailItem

  Set Item = Outlook.Application.ActiveInspector.CurrentItem

  Item.Subject = "S: " + Item.Subject

  Unload Me

End Sub

' If clicks on the close button (X) of the user form, it returns back to the email.

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

  If CloseMode = vbFormControlMenu Then

    Cancel = False

    CloseMyForm= True

  End If

End Sub

In Modules

' Global variable CloseMyForm takes the value True in case the user closes the user from the (X) button

Public CloseMyForm As Boolean

Function AddCharacteristic() As Boolean

  ' Initialize global variable closeMyForm to False every time EmailCharacteristicForm is used. Variable becomes True when form closed from (X) button.

  CloseMyForm = False

  ' Show EmailCharacteristicForm .

  EmailCharacteristicForm .Show vbModal

  ' If user closes the EmailCharacteristicForm from by clicking the (X), then should return back to the email.

  ' AddCharacteristic function returns False when userform is closed by the user and no characteristic is added.

  ‘ It returns True when the user press a button in the form to add a characteristic

  AddCharacteristic = Not CloseMsgBoxFlag

End Function

vbaproject.otm.project1 can supports two modules?

$
0
0

I have vbaproject.otm. which contains two modules Module1 and Module2.

These modules is simple VBA Code to when clicked, on the button which is located in ribbon, use specified mail template and send mail to predefined groups.

I since I have two moudles, i have added these two modules to ribbon with different Icon.

Now the problem is module1 icon on ribbon is working. 

When clicked on module2 icon on ribbon no action takes place.  I can run both module 1 and module2 codes from developer window without any errors.

Need help to run both codes from ribbon icon.

Thanks for your efforts

Bheem

Outlook 2003 is not incorporating spell check suggestions when spell checks carried out before sending.

$
0
0
Outlook 2003 is not incorporating spell check suggestions when spell checks carried out before sending.

vbModal

$
0
0

I have created a workin VBA Macro which uses the ItemSend Even to modify the Subject of an email. Form within ItemSend I call a userform (ExampleForm.Show vbModal) with 3 buttons.

When I click on the email's send button the form appears but while the form is opened I can click (outside the form) on the email and make changes. This is what I try to avoid. I do not want the user to be able to click outside the form.

Can someone help with it please, seems that vbModal is not working.</article><//article>

Extract attachments within Outlook Personal Folder and copy to network share

$
0
0

Hi All,

Wondering if someone could help me out with this one. I need to extract all attachments within email messages from a personal folder in outlook. I would like the attachments to get copied into a folder - preferably on a network share.

Also, and this is the kicker, I would like to have this all done automatically when an email comes in from a specific sender.

I looked into the rules in Outlook, but there is nothing in there about moving attachments to a shared folder on the network.

Does anyone have something like this already created or help me get to the finished result? Be gentle, I am new to scripting :-)

Get Meeting Workspace back to Outlook 2013

$
0
0

I need to enable Meeting Workspace pane in the Meeting window of the Outlook 2013.

I know button was removed but pane is still fully functional - you can open existing email with meeting workspace item and when you remove it, you can create new one as well. So I need to get this pane back in clear email. Unfortunately I know nothing about developing for Office :( Can you please point me to the right direction?


Instant message with outlook

$
0
0

Hi.

I have my own chatting application(VS2012, c++). I want connect instant message of outlook 2010.

however i don't know what how to connect Outlook.

My question is this:

1. How to log in "instant messaging program" in Outlook 2010.

2. How to get event when click the icon(chat, call) in "instant message"

3. How to add contact in instant message.(temporarily)

Any help. thank you.


Excel coding - Outlook 2013

$
0
0

Hi,

I need a coding to extract the excel file from outlook 2013(personal folder name "Test") and save in my C:

Please help me

Regards,

Abirami

MsgBox

$
0
0

Hi all,

is it possible to create an MsgBox with 4 buttons?

Thanks

How to get the shared calendar name from shared Addin application

$
0
0

Hi,

I am working on the Outlook addin application and need to create an appointment in my own calendar as well as the shared calendar in C#.

I want to get the shared calendar name after I clicked on the calendar and proceeded to create an appointment by code.

I got the below code to get the shared folder name

Outlook.NameSpace mNS=mApplication.GetNamespace("MAPI");

Outlook.Recipient mCalendarRecip = mNS.CreateRecipient("CalendarName");           
mCalendarRecip.Resolve();
Outlook.MAPIFolder  mFolder = mNS.GetSharedDefaultFolder(mCalendarRecip, Outlook.OlDefaultFolders.olFolderCalendar);

But confused how I can get the "CalendarName" to get the 'Recipient' object?

Another query is that  how can I differentiate  my own calendar and  a shared calendar ?Will the "GetSharedDefaultFolder(....)" method works in my own calendar as well?

Regards,

Nirmallya Kolay

Place apponinments to alternate calendar.

$
0
0
I am trying to create appointments in a secondary calendar in outlook. I have created a form that lets the use enter information for an appointment but I want them to be able to save it in a shared calendar rather than their default outlook calendar. I found code that will create the appointment in my default calendar but I do not know how to reference the alternate calendar. Does anyone have code that lets you change from one calendar to another when creating an appointment.

Eric Roberts

I forgot to mention, I am coding in VBA.

Is it possible to catch "Send" event on Outlook add-in in a button's onAction function?

$
0
0

Because I'm in the ribbon's class, there is no pointer to the Outlook.Application object. So, I cannot use 

Application.ItemSend+= new ApplicationEvents_11_ItemSendEventHandler(MyItemSendEventHandler)

this event handler.

How can I reach Outlook.Application object in ribbon class or are there another way to catch send event?



Viewing all 6421 articles
Browse latest View live


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