M
mrsadmin
Hi team,
Just a quick question. Can I make 2 independent subs share, or call data values from a singular source.
example:
I have 6 subs currently that run off very similar data (sending mail to the helpdesk).
They are sent in groups of 2: 1 to the Helpdesk and 1 to the source of the original email notifying them that we have received it and sent it onwards (these are normally by 3rd party outlets).
Can I have:
Sub DistA Fwd
Sub DistA Reply
Use data (email, subject, to & from etc) from Sub DistA Core
Or something similar?
For the most part DistA values are the same for Fwd & Reply so there is a lot of duplicate code.
Cheers.
Just a quick question. Can I make 2 independent subs share, or call data values from a singular source.
example:
I have 6 subs currently that run off very similar data (sending mail to the helpdesk).
They are sent in groups of 2: 1 to the Helpdesk and 1 to the source of the original email notifying them that we have received it and sent it onwards (these are normally by 3rd party outlets).
Can I have:
Sub DistA Fwd
Sub DistA Reply
Use data (email, subject, to & from etc) from Sub DistA Core
Or something similar?
For the most part DistA values are the same for Fwd & Reply so there is a lot of duplicate code.
Cheers.
Code:
Sub DistA Fwd()
'this is the basics, there is a lot more in common
'----- ----- ----- Setting Variables ----- ----- -----'Set variable email addresses
sup = "support@ domain" 'support system
admin = "admin@ domain" 'future correspondence
'----- ----- ----- Getting data from original item ----- ----- ---
received = objitem.CC 'address which received original email
dist = "distA" 'Distributor short code
distemail = objitem.SenderEmailAddress 'distributors originating email
custmail = objitem.To 'customers address from originating email "to"
origemaildate = objitem.ReceivedTime
End Sub
Sub DistA Reply
'repeat data
'enter alternative message
End Sub