Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Attachment.Add Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
chadnewman
Newbie
Newbie


Joined: 12 December 2014
Location: United States
Online Status: Offline
Posts: 6
Posted: 12 December 2014 at 10:16am | IP Logged Quote chadnewman

I'm trying to create a simple message using the mailbee.mime.message class that I can then convert to an MSG file for use with Outlook. Every thing works fine up to the point I'm trying to add an attachment. Using Visual FoxPro with a DotNet bridge.

I'm using the command:

oMessage.Attachments.Add("c:\finance\chad.pdf"),"chad.pdf") to add the attachment; however, I've receiving and OLE Error Code 0x8002000e; invalid number of parameters.

Thanks,

Chad Newman
Black Mountain Software
Back to Top View chadnewman's Profile Search for other posts by chadnewman
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 12 December 2014 at 10:52am | IP Logged Quote Alex

We're not FoxPro experts, sorry.

Without any knowledge of ForPro syntax, I would only doubt that extra ")" inside the string is required, i.e. I would write

oMessage.Attachments.Add("c:\finance\chad.pdf","chad.pdf")

instead of

oMessage.Attachments.Add("c:\finance\chad.pdf"),"chad.pdf")

but of course the suggested fix is too obvious and if it indeed were the reason you would quickly find it yourself. I believe your issue is more complicated than that (but without FoxPro skills, I can't imagine anything beyond that point).

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
chadnewman
Newbie
Newbie


Joined: 12 December 2014
Location: United States
Online Status: Offline
Posts: 6
Posted: 12 December 2014 at 1:01pm | IP Logged Quote chadnewman

Alex,
Sorry to send you down a rabbit hole. I missed typed. There is no extra ")" in my syntax.

oMessage.Attachments.Add("c:\finance\chad.pdf","chad.pdf")

Can you tell me how MailBee knows what Add syntax to use since Add is overloaded?

Thanks,

Chad
Back to Top View chadnewman's Profile Search for other posts by chadnewman
 
chadnewman
Newbie
Newbie


Joined: 12 December 2014
Location: United States
Online Status: Offline
Posts: 6
Posted: 12 December 2014 at 1:04pm | IP Logged Quote chadnewman

Alex,
I may have found another answer. Visual FoxPro is not capable of overloading, So I have to pass a value in each parameter.

I'll give this a look.

thanks,

Chad
Back to Top View chadnewman's Profile Search for other posts by chadnewman
 
chadnewman
Newbie
Newbie


Joined: 12 December 2014
Location: United States
Online Status: Offline
Posts: 6
Posted: 16 December 2014 at 1:51pm | IP Logged Quote chadnewman

Alex,
Just an FYI. Was able to figure out how to do the add with Visual FoxPro. Need to reference each overload add as an enumerated method for each way we can call the Add method.

oMessage.Attachments.Add_2("z:\finance\report.pdf")
oMessage.Attachments.Add_3("c:\finance\chad.pdf","chad.pdf")

Thanks for your time,

Chad
Back to Top View chadnewman's Profile Search for other posts by chadnewman
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 16 December 2014 at 2:21pm | IP Logged Quote Alex

Thank you for sharing this. I hope it will be helpful to other folks around.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide