Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
<o
></o
>
Our admin team currently send client documents via email. The current process is that our system automatically creates an email with the documents attached and the user then runs a macro within the email which attaches an HTML file and inserts as text to give the email a nice polished and professional look.<o
></o
>
<o
></o
>
We were using Office 2003 which allows you to manually record a macro however some users now have Office 2007 so I have to write the macro manually as the record function is no longer available. I have tried copying the VBA script however this fails with the error - Complie Error Sub or Function not defined.<o
></o
>
<o
></o
>
This was the original macro<o
></o
>
<o
></o
>
Sub addattachment()<o
></o
>
ChangeFileOpenDirectory "Z:\I.T Department\Call Back Email Templates\"
Selection.InsertFile FileName:="1506ONE process email.html", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Sub<o
></o
>
<o
></o
>
I have been given the following code to try however this just attaches the file normally and does not insert as text.<o
></o
>
<o
></o
>
Sub addattachment()<o
></o
>
ActiveInspector.CurrentItem.Attachments.Add "Z:\I.T Department\Call Back Email Templates\1506ONE process email.html"<o
></o
>
End Sub<o
></o
>
<o
></o
>
If anyone has any ideas or more information please let me know.<o
></o
>
<o
></o
>
Cheers<o
></o
>
<o
></o
>
Sean
<o
Our admin team currently send client documents via email. The current process is that our system automatically creates an email with the documents attached and the user then runs a macro within the email which attaches an HTML file and inserts as text to give the email a nice polished and professional look.<o
<o
We were using Office 2003 which allows you to manually record a macro however some users now have Office 2007 so I have to write the macro manually as the record function is no longer available. I have tried copying the VBA script however this fails with the error - Complie Error Sub or Function not defined.<o
<o
This was the original macro<o
<o
Sub addattachment()<o
ChangeFileOpenDirectory "Z:\I.T Department\Call Back Email Templates\"
Selection.InsertFile FileName:="1506ONE process email.html", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Sub<o
<o
I have been given the following code to try however this just attaches the file normally and does not insert as text.<o
<o
Sub addattachment()<o
ActiveInspector.CurrentItem.Attachments.Add "Z:\I.T Department\Call Back Email Templates\1506ONE process email.html"<o
End Sub<o
<o
If anyone has any ideas or more information please let me know.<o
<o
Cheers<o
<o
Sean