Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 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: Using Macros with Send SLX function.
Heather
Posts: 3
 
Using Macros with Send SLX function.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 12 7:37 AM
fiogf49gjkf0d

I have created a button in one of Saleslogix screen forms that opens up an Excel spreadsheet, from there, there are some macro's that work out some formula's and then forward the email on (to the correct department), what I would like to know is if anyone can advise on whether I can get Outlook to use Send SLX, instead of just the standard Send function. (This allows email threads to then be recorded in Saleslogix).


My current macro works very well (I have shown the VB below), I just want the .send to activate the send slx, but I don't know what the code is for it.


Can anyone help?


 


Public Sub Sales()


Range("F22").Value = Now()


Filename = InputBox("Please Enter Customer Name and Reference")


ActiveWorkbook.SaveAs Filename:="\\***.***.*.*\***\" & Filename


'ThisWorkbook.SaveAs (Environ("userprofile") & Application.PathSeparator & "Desktop" & Application.PathSeparator & FileName)'


Dim myOutlook As Object


Dim myMailItem As Object


Set otlApp = CreateObject("Outlook.Application")


Set otlNewMail = otlApp.CreateItem(olMailItem)


fname = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name


With otlNewMail


.To = "****@*****.com"


.Subject = "***" & Filename


.Body = "Please find attached ***" & Filename


.Attachments.Add fname


.Send


End With


Set otlNewMail = Nothing


Set otlApp = Nothing


Set otlAttach = Nothing


Set otlMess = Nothing


Set otlNSpace = Nothing


End Sub


Thanks


Heather

[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Using Macros with Send SLX function.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Sep 12 7:04 AM
fiogf49gjkf0d

Here are a few things you can experiment with


1. Get the debugger going from Excel and see if you can find the Add In for SalesLogix in Outlook.


2. If you can, then poke around until you can find the method to invoke it.


Plan B


3. Stop your code before the email send, and look to see if Send SLX is in your outlook message window


4. If it is, then you may want to consider just commenting out your code for the send, and setting focus to the message body in case the user wants to add anything to the automated email & then have them send slx from there.


Plan C


5. Write the history and attachment records via code.

[Reply][Quote]
Heather
Posts: 3
 
Re: Using Macros with Send SLX function.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Sep 12 7:36 AM
fiogf49gjkf0d

Walter,


Thanks for the advice, used the debugger as suggested, found the code and it works great.


I don't suppose you would have any hints as to how I get it to use Send SLX whilst dumping the attachment into Saleslogix too?


It records the email in Notes/History under the contact, but doesn't record the attachment?


I know it's probably an unusual request but I am trying to improve traceability within my system.


Thanks

[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Using Macros with Send SLX function.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Sep 12 8:57 AM
fiogf49gjkf0d

Since SendSLX normally handles attachments for you, i would go back to the debugger and look at the add in to see if there is some additional functionality you might have missed.


 


ws

[Reply][Quote]
Alex Rosier
Posts: 5
 
Re: Using Macros with Send SLX function.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jul 13 3:20 PM

Hi Heather,


Would you be willing to share the code you uncovered for the SendSLX function.  I seem to be working on a similar project and would love to not have to reinvent the wheel with this one.


Thank you for your consideration.


Alex

[Reply][Quote]
Heather
Posts: 3
 
Re: Using Macros with Send SLX function.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jul 13 7:50 AM
fiogf49gjkf0d

Hi Alex,


I am happy to share with you, what I have at the moment. I have an excel form, that our users complete, then they press a button at the bottom of the form, once completed, that holds the following macro.


I spent a lot of time on this, and it has built in error checking for empty fields, and also saves a copy of the file you intend to email, to a specified location. 


All this works really well, the only thing I have not successfully managed to do, is to add the attachment into Saleslogix. I'm not sure how good you are at debugging etc, but if you manage to find the 'tweek' that allows to send using Saleslogix rather than the standard Outlook Send, I would appreciate your feedback!


FYI : I did try various alterations of the final part of the macro, I believe the .Send needs to be something else, I tried the obvious .SendSLX etc, but couldn't get any joy with that. (I am, however, running Saleslogix 6.1 here).


 


Public Sub xyz()


Dim toAddress


toAddress = Range("c41").Value


If Range("d21").Value = "" Then


MsgBox "Error:  'Requested by' box is not completed."


End


Else


End If


MsgBox "Running:  Sending to " & toAddress


Range("F21").Value = Now()


Filename = InputBox("Please Enter Customer Name and Reference")


ActiveWorkbook.SaveAs Filename:="\\IP of Server\and path\" & "RFQ_" & Filename   ****This is for saving a copy of the file you are emailing to a folder****


'ThisWorkbook.SaveAs (Environ("userprofile") & Application.PathSeparator & "Desktop" & Application.PathSeparator & "RFQ_" & FileName)'


Dim myOutlook As Object


Dim myMailItem As Object


Set otlApp = CreateObject("Outlook.Application")


Set otlNewMail = otlApp.CreateItem(olMailItem)


fname = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name


With otlNewMail


.To = toAddress


.Subject = "RFQ " & Filename


.Body = "Please find attached RFQ" & Filename


.Attachments.Add fname


.Send


End With


Set otlNewMail = Nothing


Set otlApp = Nothing


Set otlAttach = Nothing


Set otlMess = Nothing


Set otlNSpace = Nothing


End Sub


 

[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): 2/22/2025 4:02:15 PM