|
-
Jul 30th, 2010, 05:42 AM
#1
Thread Starter
Addicted Member
[RESOLVED] email a document
I’ve got a sub-routine that e-mails a completed document automatically (if the user chooses that option). The code that I copied to do this uses the line
Set myOutlook = Nothing
when it has finished sending the e-mail. Can I delete this line because most users won’t want to close their Outlook? (The code uses a GetObject... / myOutlook.CreateItem method).
Last edited by Resource Dragon; Jul 30th, 2010 at 05:46 AM.
Reason: Add extra info that hopefully makes it easier for others to help me.
-
Jul 30th, 2010, 06:21 AM
#2
Re: email a document
setting myoutlook to nothing does not actually close outlook, just disconnects from it
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jul 30th, 2010, 06:32 AM
#3
Thread Starter
Addicted Member
Re: email a document
So is the problem line
myOutlook.Quit ?
If so, can I delete it?
-
Jul 30th, 2010, 07:28 AM
#4
Re: email a document
Delete it and see if it fixes the problem. I don't know the Outlook object model, but that method sounds like one that will make Outlook go away.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Aug 1st, 2010, 04:46 PM
#5
Re: email a document
just comment it out first to try
but that is the instruction to close outlook
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 2nd, 2010, 05:38 AM
#6
Thread Starter
Addicted Member
Re: email a document
I tried it without "Outlook.Quit" today & it worked perfectly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|