ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 22nd, 2003, 08:16 AM
brunette brunette is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 brunette User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Outlook 2000 - Macro trouble

Hi everyone,

I know absolutely nothing about VBscript(my srengths lie elsewhere...). So I recently copied a macro script which would enable automatic printing of every email I send from Outlook 2k. The macro works 100% fine but there is one slight problem. It first prints the message, THEN sends it. This results in the printed report not showing me vital information, such as to whom it was sent, date, time etc. How can I modify the code to FIRST send the message, and only print it once it lands in the Sent Items folder? Printing an email from this folder shows the info I need on the printout. Any ideas?

Thanx
Brunette

Reply With Quote
  #2  
Old August 22nd, 2003, 11:59 AM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 7
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
Your question is quite general. It seems that the macro has two steps: printing and sending.

Since your knowledge of VB is limited, i encourage you to post the macro code here, so we can have a look at it.

Thanks,
__________________
- Rogier Doekes

Reply With Quote
  #3  
Old August 22nd, 2003, 12:06 PM
brunette brunette is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 brunette User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi Rogier,

Thanks for replying.

The code is as follows:

Public Sub SendWithPrint()
'Performe l'envoie de l'Email
Dim oInsp As Outlook.Inspector
Dim oMail As Outlook.MailItem
Dim olFolderSentMail As Object
Dim bNoMailItem As Boolean

If TypeName(Application.ActiveWindow) = "Inspector" Then
Set oInsp = Application.ActiveInspector
If TypeName(oInsp.CurrentItem) <> "MailItem" Then
bNoMailItem = True
End If
Else
bNoMailItem = True
End If
If bNoMailItem Then
MsgBox "Must be in the Email Window you want to send"
Exit Sub
End If


Set oMail = oInsp.CurrentItem 'Le l'envoie Puis Print
Set oCurrentFolder = olFolderSentMail 'oMail.Send'
oMail.PrintOut
oMail.Send
'the change b'cause U have not close oMail
End Sub


Thanks for your help
Bru

Reply With Quote
  #4  
Old August 22nd, 2003, 01:12 PM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 7
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
If you switch oMail.PrintOut and oMail.Send? Does that help?

Reply With Quote
  #5  
Old August 25th, 2003, 04:15 AM
brunette brunette is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 brunette User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi Rogier,

I've tried to change them around but it won't let me. It gives me an error message saying that I've moved or removed the item.

Thanx again
Bru

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Outlook 2000 - Macro trouble


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT