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

Automate attachment selection



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 10th 08, 12:12 PM posted to microsoft.public.outlook.program_forms
Padds
external usenet poster
 
Posts: 4
Default Automate attachment selection

I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. The contents of the file change, however, the name and path remain
constant.

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created).

Is this possible? If so, how do I do it?
Ads
  #2  
Old January 11th 08, 09:53 PM posted to microsoft.public.outlook.program_forms
karlman[_2_]
external usenet poster
 
Posts: 18
Default Automate attachment selection

On Jan 10, 3:12*am, Padds wrote:
I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. *The contents of the file change, however, the name and path remain
constant. *

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created). *

Is this possible? *If so, how do I do it? *


How about just create a link to the file in the form. The actual file
will not be saved in the form, just the link information on wher it is
located. You could change the file all you wanted as long as it's name
remained the same.

Karl
  #3  
Old January 23rd 08, 09:19 AM posted to microsoft.public.outlook.program_forms
Padds
external usenet poster
 
Posts: 4
Default Automate attachment selection

This won't work in my situation I'm afraid.

The attachment will be sent to external recipients (I should have specified
that in my original question).

Thank's for your reply though - do you have any more suggestions?

"karlman" wrote:

On Jan 10, 3:12 am, Padds wrote:
I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. The contents of the file change, however, the name and path remain
constant.

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created).

Is this possible? If so, how do I do it?


How about just create a link to the file in the form. The actual file
will not be saved in the form, just the link information on wher it is
located. You could change the file all you wanted as long as it's name
remained the same.

Karl

  #4  
Old January 23rd 08, 03:06 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Automate attachment selection

An Outlook custom form is not a good solution for this scenario, given that custom forms can cause attachment problems for external recipients.

Instead, you could write a little VBA macro to attach the file.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Padds" wrote in message ...
This won't work in my situation I'm afraid.

The attachment will be sent to external recipients (I should have specified
that in my original question).

Thank's for your reply though - do you have any more suggestions?

"karlman" wrote:

On Jan 10, 3:12 am, Padds wrote:
I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. The contents of the file change, however, the name and path remain
constant.

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created).

Is this possible? If so, how do I do it?


How about just create a link to the file in the form. The actual file
will not be saved in the form, just the link information on wher it is
located. You could change the file all you wanted as long as it's name
remained the same.

Karl

  #5  
Old February 12th 08, 10:58 AM posted to microsoft.public.outlook.program_forms
Padds
external usenet poster
 
Posts: 4
Default Automate attachment selection

VBA Macros don't fall into my area of expertise - could you give me some
pointers on where I should start?

"Sue Mosher [MVP-Outlook]" wrote:

An Outlook custom form is not a good solution for this scenario, given that custom forms can cause attachment problems for external recipients.

Instead, you could write a little VBA macro to attach the file.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Padds" wrote in message ...
This won't work in my situation I'm afraid.

The attachment will be sent to external recipients (I should have specified
that in my original question).

Thank's for your reply though - do you have any more suggestions?

"karlman" wrote:

On Jan 10, 3:12 am, Padds wrote:
I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. The contents of the file change, however, the name and path remain
constant.

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created).

Is this possible? If so, how do I do it?

How about just create a link to the file in the form. The actual file
will not be saved in the form, just the link information on wher it is
located. You could change the file all you wanted as long as it's name
remained the same.

Karl


  #6  
Old February 16th 08, 09:22 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Automate attachment selection

Outlook version? Do you use Word as your email editor?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Padds" wrote in message ...
VBA Macros don't fall into my area of expertise - could you give me some
pointers on where I should start?

"Sue Mosher [MVP-Outlook]" wrote:

An Outlook custom form is not a good solution for this scenario, given that custom forms can cause attachment problems for external recipients.

Instead, you could write a little VBA macro to attach the file.

"Padds" wrote in message ...
This won't work in my situation I'm afraid.

The attachment will be sent to external recipients (I should have specified
that in my original question).

Thank's for your reply though - do you have any more suggestions?

"karlman" wrote:

On Jan 10, 3:12 am, Padds wrote:
I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. The contents of the file change, however, the name and path remain
constant.

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created).

Is this possible? If so, how do I do it?

How about just create a link to the file in the form. The actual file
will not be saved in the form, just the link information on wher it is
located. You could change the file all you wanted as long as it's name
remained the same.

Karl


  #7  
Old February 19th 08, 09:25 PM posted to microsoft.public.outlook.program_forms
Padds
external usenet poster
 
Posts: 4
Default Automate attachment selection

Outlook 2003 with Word 2003 as the email editor.

"Sue Mosher [MVP-Outlook]" wrote:

Outlook version? Do you use Word as your email editor?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Padds" wrote in message ...
VBA Macros don't fall into my area of expertise - could you give me some
pointers on where I should start?

"Sue Mosher [MVP-Outlook]" wrote:

An Outlook custom form is not a good solution for this scenario, given that custom forms can cause attachment problems for external recipients.

Instead, you could write a little VBA macro to attach the file.

"Padds" wrote in message ...
This won't work in my situation I'm afraid.

The attachment will be sent to external recipients (I should have specified
that in my original question).

Thank's for your reply though - do you have any more suggestions?

"karlman" wrote:

On Jan 10, 3:12 am, Padds wrote:
I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. The contents of the file change, however, the name and path remain
constant.

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created).

Is this possible? If so, how do I do it?

How about just create a link to the file in the form. The actual file
will not be saved in the form, just the link information on wher it is
located. You could change the file all you wanted as long as it's name
remained the same.

Karl



  #8  
Old February 24th 08, 04:07 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Automate attachment selection

Because Word is your email editor, you would need to create this macro in Word. Insert a new module in the Normal.dot template and put the macro there.

Sub InsertFile()
' requires reference to Microsoft Outlook library
Dim objOL As Outlook.Application
Dim objInsp As Outlook.Inspector
Dim objMail As Outlook.MailItem
On Error Resume Next
Set objOL = GetObject(, "Outlook.Application")
Set objInsp = objOL.ActiveInspector
Set objMail = objInsp.CurrentItem
objMail.Attachments.Add "C:\data\myfile.txt"
Set objMail = Nothing
Set objInsp = Nothing
Set objOL = Nothing
End Sub

You can then run it from an open Outlook message by using Alt+F8 or add a custom toolbar that includes that macro as a button.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Padds" wrote in message ...
Outlook 2003 with Word 2003 as the email editor.

VBA Macros don't fall into my area of expertise - could you give me some
pointers on where I should start?

"Sue Mosher [MVP-Outlook]" wrote:

An Outlook custom form is not a good solution for this scenario, given that custom forms can cause attachment problems for external recipients.

Instead, you could write a little VBA macro to attach the file.

"Padds" wrote in message ...
This won't work in my situation I'm afraid.

The attachment will be sent to external recipients (I should have specified
that in my original question).

Thank's for your reply though - do you have any more suggestions?

"karlman" wrote:

On Jan 10, 3:12 am, Padds wrote:
I would like to create a form, essentially a newsletter, that will
automatically attach a file from a particular location each time the form is
opened. The contents of the file change, however, the name and path remain
constant.

e.g.
I would like G:\folder1\file1.zip to be attached to a form each time the
form is opened (rather than have the attachment saved along with the form
which would mean that the new data in this file would not be attached after
the form was created).

Is this possible? If so, how do I do it?

How about just create a link to the file in the form. The actual file
will not be saved in the form, just the link information on wher it is
located. You could change the file all you wanted as long as it's name
remained the same.

Karl



  #9  
Old May 2nd 08, 08:25 PM posted to microsoft.public.outlook.program_forms
Marc[_3_]
external usenet poster
 
Posts: 3
Default Automate attachment selection

So sorry about this bump but I have been struggling with a similar problem as well. I am trying to attach one Excel file with all my outgoing e-mails. It will be the same Excel file and I am looking to have the attachment already attached to the e-mail when I click on "New" to send a new e-mail.

Is that possible with the VB code suemvp provided above? Much thanks for your help. :blush:
  #10  
Old May 2nd 08, 10:02 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Automate attachment selection

What code are you referring to? "above" doesn't have a concrete meaning in a discussion forum that can be accessed any number of different ways.

Also, does the Excel file itself change?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Marc" wrote in message ...
So sorry about this bump but I have been struggling with a similar problem as well. I am trying to attach one Excel file with all my outgoing e-mails. It will be the same Excel file and I am looking to have the attachment already attached to the e-mail when I click on "New" to send a new e-mail.

Is that possible with the VB code suemvp provided above? Much thanks for your help. :blush:

 




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
Get selection into textstring Peter R.[_2_] Outlook and VBA 8 December 6th 07 05:50 PM
Language selection does not take ritter197 Outlook - General Queries 0 October 23rd 06 11:35 PM
Contact selection DCL Outlook - Using Contacts 5 September 15th 06 03:06 AM
Message selection Julieta Prandi Add-ins for Outlook 0 March 30th 06 11:22 PM
Is it possible to automate this? John 3:16 Outlook - General Queries 0 March 27th 06 03:26 PM


All times are GMT +1. The time now is 09:02 PM.


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