7/6/2025 3:32:33 AM
|
|
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!
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.
|
|
|
|
oSLXDocument.AddAttachment - Driving me crazy!
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? |
|
|
| |
|
Re: oSLXDocument.AddAttachment - Driving me crazy!
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! |
|
|
|
Re: oSLXDocument.AddAttachment - Driving me crazy!
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 |
|
|
|
Re: oSLXDocument.AddAttachment - Driving me crazy!
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. |
|
|
| |
|
Re: oSLXDocument.AddAttachment - Driving me crazy!
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
|
|
|
|
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!
|
|
|
|
|
|
|
|