Outlook Gurus, I have a question

Thread Tools
 
Search this Thread
 
  #1  
Old 05-15-2006, 12:03 PM
KSUWildcat's Avatar
Senior Member
Thread Starter
Join Date: Jun 2005
Location: Pratt, KS
Posts: 258
Likes: 0
Received 0 Likes on 0 Posts
Outlook Gurus, I have a question

I send out an email every Monday with an attachment that I update weekly. I have figured out by now to compose a message template that contains the same recipients, subject line, and body of the message. Is there a way to have the template automatically update the attachment? Outlook help is useless.

What I want to do is update the attachment on my desktop, open the message template, and send it off.

TIA
 
  #2  
Old 05-15-2006, 12:09 PM
UrbanCowboy's Avatar
Senior Member
Join Date: Mar 2000
Location: Westminster, CO
Posts: 481
Likes: 0
Received 0 Likes on 0 Posts
I dont think you can do that without deleting the old attachment and adding a new one.

I just tried myself and attempted a couple ideas; no luck.
 
  #3  
Old 05-15-2006, 12:26 PM
vader716's Avatar
Senior Member
Join Date: Jan 2003
Location: Pikesville, MD
Posts: 2,079
Likes: 0
Received 0 Likes on 0 Posts
Something like this should work:


Sub Test()
Dim objMail As Outlook.MailItem

Set objMail = Application.CreateItem(olMailItem)
With objMail
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" ' The mail body
.Display 'Show it
.OutlookAttach = .Attachments.Add("C:\test.txt")


End With


End Sub
 
  #4  
Old 05-15-2006, 12:30 PM
UrbanCowboy's Avatar
Senior Member
Join Date: Mar 2000
Location: Westminster, CO
Posts: 481
Likes: 0
Received 0 Likes on 0 Posts
Oh sure; if you want to use VB.
 
  #5  
Old 05-15-2006, 12:38 PM
KSUWildcat's Avatar
Senior Member
Thread Starter
Join Date: Jun 2005
Location: Pratt, KS
Posts: 258
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by vader716
Something like this should work:


Sub Test()
Dim objMail As Outlook.MailItem

Set objMail = Application.CreateItem(olMailItem)
With objMail
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" ' The mail body
.Display 'Show it
.OutlookAttach = .Attachments.Add("C:\test.txt")


End With


End Sub
So your saying it looks like I'm better off deleting and attaching the old fashioned way. Had I a little more time to invest in Visual Basic, this would be the answer!

Thanks though!
 
  #6  
Old 05-15-2006, 12:38 PM
vader716's Avatar
Senior Member
Join Date: Jan 2003
Location: Pikesville, MD
Posts: 2,079
Likes: 0
Received 0 Likes on 0 Posts
yea well....works dont it?

(actually I didnt debug it but it did create the message with the file for me)
 
  #7  
Old 05-15-2006, 12:42 PM
UrbanCowboy's Avatar
Senior Member
Join Date: Mar 2000
Location: Westminster, CO
Posts: 481
Likes: 0
Received 0 Likes on 0 Posts
That's pretty sweet Vader. I write Macros for Excel all the time; have never thought of doing them in Outlook.
 

Trending Topics

  #8  
Old 05-15-2006, 12:42 PM
vader716's Avatar
Senior Member
Join Date: Jan 2003
Location: Pikesville, MD
Posts: 2,079
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by KSUWildcat
So your saying it looks like I'm better off deleting and attaching the old fashioned way. Had I a little more time to invest in Visual Basic, this would be the answer!

Thanks though!
actually when you go into Outlook and macros...you should be able to code it yourself...you shouldnt need a full copy of VB
 
  #9  
Old 05-15-2006, 12:44 PM
UrbanCowboy's Avatar
Senior Member
Join Date: Mar 2000
Location: Westminster, CO
Posts: 481
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by KSUWildcat
So your saying it looks like I'm better off deleting and attaching the old fashioned way. Had I a little more time to invest in Visual Basic, this would be the answer!
Originally Posted by vader716
actually when you go into Outlook and macros...you should be able to code it yourself...you shouldnt need a full copy of VB
He said Time Vader not Money.
 
  #10  
Old 05-15-2006, 12:55 PM
vader716's Avatar
Senior Member
Join Date: Jan 2003
Location: Pikesville, MD
Posts: 2,079
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by UrbanCowboy
He said Time Vader not Money.
ok so I cant read.....

whats the big deal.....reading isnt that important anyways....



See I'm faking it over a cup of coffee
 
  #11  
Old 05-15-2006, 01:06 PM
KSUWildcat's Avatar
Senior Member
Thread Starter
Join Date: Jun 2005
Location: Pratt, KS
Posts: 258
Likes: 0
Received 0 Likes on 0 Posts
Actually looking at it a little more over lunch here, this isn't so bad.
Are you getting a 438 error regarding the attachment code? And why doesn't it generate a message everytime I run the macro?

Now how do I add my signature? Can I make a shortcut on my desktop to run this macro?
 
  #12  
Old 05-15-2006, 01:14 PM
vader716's Avatar
Senior Member
Join Date: Jan 2003
Location: Pikesville, MD
Posts: 2,079
Likes: 0
Received 0 Likes on 0 Posts
Sub Test()
Dim objMail As Outlook.MailItem

Set objMail = Application.CreateItem(olMailItem)
With objMail
'messageclass would load a form called test
.MessageClass = ("ipm.note.test")
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" & vbCr & vbCr & "Thank you," & vbCr & "Signature goes here" ' The mail body
.Attachments.Add ("C:\test.txt")
.Display 'Show it



End With

Try this

You can add a button by right clicking the toolbar, customize, macros, select the macro and drag it to the bar
 

Last edited by vader716; 05-15-2006 at 01:22 PM.
  #13  
Old 05-15-2006, 01:18 PM
KSUWildcat's Avatar
Senior Member
Thread Starter
Join Date: Jun 2005
Location: Pratt, KS
Posts: 258
Likes: 0
Received 0 Likes on 0 Posts
Can I do the signature with an HTML signature?
 
  #14  
Old 05-15-2006, 01:30 PM
vader716's Avatar
Senior Member
Join Date: Jan 2003
Location: Pikesville, MD
Posts: 2,079
Likes: 0
Received 0 Likes on 0 Posts
Sub Test()
Dim objMail As Outlook.MailItem

Set objMail = Application.CreateItem(olMailItem)
With objMail
'messageclass would load a form called test
.MessageClass = ("ipm.note.test")
.To = "Test" 'Insert a name to be sent to
.Attachments.Add ("C:\test.txt")
.HTMLBody = "<html><font color = #00B2EE body text='#00B2EE'> <b>text: <font color = #b90000><i><b>" & "</b></i></font><br>Comment: <font color = #00B2EE><i><b>" & "</b></i></font> <p>Thanks </body></html>"
.Display 'Show it


End With


End Sub
 

Last edited by vader716; 05-15-2006 at 01:37 PM.
  #15  
Old 05-15-2006, 01:32 PM
KSUWildcat's Avatar
Senior Member
Thread Starter
Join Date: Jun 2005
Location: Pratt, KS
Posts: 258
Likes: 0
Received 0 Likes on 0 Posts
Oh Snap!

Thanks Vader, I have a very limited scope of programming.

add: I can't get both the HTML and "plain text" body to show at the same time.
nm, I got it.
 

Last edited by KSUWildcat; 05-15-2006 at 01:47 PM.



Quick Reply: Outlook Gurus, I have a question



All times are GMT -4. The time now is 07:19 PM.