|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
If you switch oMail.PrintOut and oMail.Send? Does that help?
|
|
#5
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Outlook 2000 - Macro trouble |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|