PC Review


Reply
Thread Tools Rate Thread

Automate attachment selection

 
 
Padds
Guest
Posts: n/a
 
      10th Jan 2008
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?
 
Reply With Quote
 
 
 
 
karlman
Guest
Posts: n/a
 
      11th Jan 2008
On Jan 10, 3:12*am, Padds <Pa...@discussions.microsoft.com> 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
 
Reply With Quote
 
Padds
Guest
Posts: n/a
 
      23rd Jan 2008
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 <Pa...@discussions.microsoft.com> 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
>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      23rd Jan 2008
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" <(E-Mail Removed)> wrote in message news:2DA12A0E-BE06-475A-A7A7-(E-Mail Removed)...
> 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 <Pa...@discussions.microsoft.com> 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
>>

 
Reply With Quote
 
Padds
Guest
Posts: n/a
 
      12th Feb 2008
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" <(E-Mail Removed)> wrote in message news:2DA12A0E-BE06-475A-A7A7-(E-Mail Removed)...
> > 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 <Pa...@discussions.microsoft.com> 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
> >>

>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      16th Feb 2008
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" <(E-Mail Removed)> wrote in message news:39DA56E1-F952-476C-8AA7-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message news:2DA12A0E-BE06-475A-A7A7-(E-Mail Removed)...
>> > 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 <Pa...@discussions.microsoft.com> 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
>> >>

>>

 
Reply With Quote
 
Padds
Guest
Posts: n/a
 
      19th Feb 2008
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" <(E-Mail Removed)> wrote in message news:39DA56E1-F952-476C-8AA7-(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message news:2DA12A0E-BE06-475A-A7A7-(E-Mail Removed)...
> >> > 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 <Pa...@discussions.microsoft.com> 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
> >> >>
> >>

>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      24th Feb 2008
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" <(E-Mail Removed)> wrote in message news:C937899C-DBA7-4956-A56C-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message news:2DA12A0E-BE06-475A-A7A7-(E-Mail Removed)...
>> >> > 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 <Pa...@discussions.microsoft.com> 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
>> >> >>
>> >>

>>

 
Reply With Quote
 
Marc
Guest
Posts: n/a
 
      2nd May 2008
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:
 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      2nd May 2008
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" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
> 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:

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automate Selection kaholynn Microsoft Excel Misc 4 1st Jan 2009 04:36 PM
Automate cell selection mayanklal Microsoft Excel Programming 1 12th Jun 2006 04:32 PM
Automate column selection =?Utf-8?B?U25vb3B5?= Microsoft Excel Setup 1 27th Jan 2006 03:26 PM
How to automate contact selection jpottsx1@gmail.com Microsoft Outlook VBA Programming 1 4th Nov 2005 06:50 PM
automate attachment tom robertson Microsoft Frontpage 1 12th Jul 2004 01:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:55 AM.