A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Code to Attach File - Not Working in Outlook '07



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 15th 11, 07:00 PM
Bendo Bendo is offline
Junior Member
 
First recorded activity at Outlookbanter: Jun 2011
Posts: 1
Default Code to Attach File - Not Working in Outlook '07

I have an Outlook form that was created in Outlook 2003 and everything worked fine. There is a custom button on the form to launch a file attachment dialog. We use the separate button because there is code that goes along with the attach action that wipes out the body of the email prior to attaching the document and then inserts some default messaging after the attachment.

Anyway, we're switching to Outlook '07 and the code to launch the attach dialog is no longer working (I assume because the original code used the Outlook menu as a reference, which has changed.) Any idea on what the correct code would be for Outlook '07?

Sub ShowAttachmentDialog()
Dim objInsp
Dim colCB
Dim objCBB
On Error Resume Next
Set objInsp = Item.GetInspector
Set colCB = objInsp.CommandBars
Set objCBB = colCB.FindControl(, 1079)
If Not objCBB Is Nothing Then
objCBB.Execute
End If
Set objCBB = Nothing
Set colCB = Nothing
Set objInsp = Nothing
End Sub
Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to attach a file with MS Outlook, from a program? niladri Outlook - Using Forms 3 September 14th 09 02:24 PM
Attach digital Signature with code andyoye Outlook and VBA 3 July 31st 08 04:21 PM
Attach VB Code to Form? G Outlook - Using Forms 5 August 20th 07 08:45 PM
Cannot Attach File with Outlook 2007 Rob Schneider Outlook - General Queries 1 April 7th 07 02:14 PM
Code to attach more than 1 document Jas Outlook and VBA 1 March 22nd 06 07:41 AM


All times are GMT +1. The time now is 04:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.