H
Hari Menon
Hello, I have a custom outlook form that takes a value from a custom field
and writes the values to a file. The code then attaches this file. Is
there a way to do this without writing the file to disk?
Here is my code:
Function Item_Send()
Dim myOlApp, myItem, fso, f1
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(5)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.CreateTextFile("c:\test.txt", True)
f1.WriteLine("Value
is:"+Item.GetInspector.ModifiedFormPages("Message").Controls("TxtValue1").Text)
f1.Close
Item.Attachments.Add("c:\WebPushRecipientDataAttachment.xml")
End Function
From the MSDN Documentation, it says the parameter to Item.Attachments.add
is: "Source Required Variant. The file (represented by the full path and
file name) OR item that constitutes the attachment."
Is it posible to build the "item that constitutes the attachment" in memory
and then attach it without using the file system?
Thanks
and writes the values to a file. The code then attaches this file. Is
there a way to do this without writing the file to disk?
Here is my code:
Function Item_Send()
Dim myOlApp, myItem, fso, f1
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(5)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.CreateTextFile("c:\test.txt", True)
f1.WriteLine("Value
is:"+Item.GetInspector.ModifiedFormPages("Message").Controls("TxtValue1").Text)
f1.Close
Item.Attachments.Add("c:\WebPushRecipientDataAttachment.xml")
End Function
From the MSDN Documentation, it says the parameter to Item.Attachments.add
is: "Source Required Variant. The file (represented by the full path and
file name) OR item that constitutes the attachment."
Is it posible to build the "item that constitutes the attachment" in memory
and then attach it without using the file system?
Thanks