Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: oSLXDocument.AddAttachment - Driving me crazy!
Guy Barrett
Posts: 63
 
oSLXDocument.AddAttachment - Driving me crazy!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jul 07 4:57 AM
Has anyone had any luck with the oSLXDocument.AddAttachment() command when merging to email using the MailMerge SDK? I've tried pulling it apart in Visual Studio and have found the command...

AddAttachment(ByVal AttachmentType As SLXDoc.AttachmentType, ByVal FileID As String, ByVal FileName As String, ByVal FullPath As String, ByVal PluginAttachID As String)

However, I cannot get it to work at all! All I am trying to do is ...

oSLXDocument.MailMergeInformation.OverrideAttachments = False
oSLXDocument.AddAttachment atRegularAttachment, "", "test.doc", "c:\temp\", ""

Absolutely nothing, the email merges and commits but does not send. If I do not bother trying to add attachments to the email it merges perfectly and sends. I can supply the full script if needed.

Help?
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: oSLXDocument.AddAttachment - Driving me crazy!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jul 07 3:39 AM
Guy
Please post entire script - I've used this in the past and it worked fine.
[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: oSLXDocument.AddAttachment - Driving me crazy!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jul 07 6:44 AM
Hi Mike,

In the end I did a dirty workaround. What I am trying to acheive is...

1) Merge to a word document which I then place in a temporary folder.
2) Merge to an email, and attach the previously merged word document to the email.

The problem I was having is that the "AddAttachment" command only seems to work if you add a Library attachment. It didn't work if you tried to attach a file from a local path, or from the ATTACHMENT table (thus looking over a UNC path).

So, what I did was...

1) Merge to a word document, which I then place in a temporary folder.
2) Copy the word document into the shared network SLXLibrary folder.
3) Create a LIBRARYDOCS record for the copied file.
4) Merge to an email, attaching the document using "AddAttachment" and supplying the FILEID from the LIBRARYDOCS record and the UNC path and filename to the shared library folder.
5) Email sends.
5) Delete the record from LIBRARYDOCS.
6) Delete the file from the shared LIBRARY folder.
7) Delete the file from the temp folder.

I know this is a bit convoluted, but it seems to work fine. The SDK for MailMerge is very poorly documented, even if you rip the classes to bits in Visual Studio it is difficult to figure out what half the classes, events and properties are actually trying to acheive. As the SDK documentation states, it is not going to be supported, and could well change without warning in any SP or future release of Saleslogix. As such, I think I'll leave it as it is.

Thanks for your offer of help though Mike, much appreciated. Now I just need some headache pills

Guy.

PS: Just found out that Outlook 2007 no longer supports full HTML and CSS - That's opened up a whole new can of worms!
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: oSLXDocument.AddAttachment - Driving me crazy!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jul 07 6:51 AM
Hi Guy

Yes, they now use Word 2007 as the rendering engine - not IExplore - security issues apparently !

With MM - do you have the document that explains it (as opposed to just ripping it apart !) - part of the SDK ? If not, email me and I'll send it on.

Mike
[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: oSLXDocument.AddAttachment - Driving me crazy!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jul 07 6:59 AM
Not exactly sure how to get hold of your email address so I have sent you a message using this site, with my email address in it.

Confusing day today, I live in wonder that I can still figure out how to breathe sometimes.
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: oSLXDocument.AddAttachment - Driving me crazy!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jul 07 7:07 AM
Yup - got it and sent it !
[Reply][Quote]
jose
Posts: 5
 
Re: oSLXDocument.AddAttachment - Driving me crazy!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Nov 10 6:25 PM
fiogf49gjkf0d

hi there


i need your help


i am triying to use the mailmerge AddAttachment


can you elavorate more on how did you solve the problem?


this are the lines that i am using


oSLXDocument.MailMergeInformation.OverrideAttachments = true
oSLXDocument.AddAttachment atRegularAttachment, "2", "test.pdf", "\\xxx.xxx.xxx.xxx\SyncLogs\Library\", vPluginID


the number 2 its the id on  LIBRARYDOCS


need help


 

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/5/2025 11:36:11 PM