|
-
Sep 27th, 2000, 04:43 PM
#1
Thread Starter
Lively Member
I used this code to save attachments inserted in an e-mail.
Dim out As Outlook.Application
Dim myItem As MailItem
Set out = CreateObject("outlook.application")
Set myItem = out.ActiveInspector.CurrentItem
myItem.attachments.Item(1).SaveAsFile PathAttachments
Then Message error is :
Object variable or with block variable not set!!!
What is happened????
Please help me!!!!!
-
Sep 28th, 2000, 06:05 PM
#2
Fanatic Member
I imagine you figured this out from the e-mail I sent you but just in case, remove the "as" and everything after it in each dim statement and you should be fine I think.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Sep 28th, 2000, 07:24 PM
#3
Frenzied Member
Actually, almost... need to add the Server object to the CreateObject too... Assuming your working in VBScript in ASP...
Code:
Dim out
Dim myItem
Set out = Server.CreateObject("outlook.application")
Set myItem = out.ActiveInspector.CurrentItem
myItem.attachments.Item(1).SaveAsFile PathAttachments
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Sep 29th, 2000, 04:32 PM
#4
Fanatic Member
monte96:
Good point, but the way he explained the e-mails he sent I think he was using vbscript without any ASP.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Sep 29th, 2000, 05:08 PM
#5
Thread Starter
Lively Member
That´s true. I just using VB 5.0 SP3
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
|