![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
My program;
#define mailitem 0 oOutLookObject = CreateObject("Outlook.Application") oEmailItem = oOutLookObject.CreateItem(mailitem) WITH oEmailItem ]) .Subject = [TEST] .cc=[ ] .Importance=1 .Body = [ ] ??????? && here i need to attach a file *.msg or *.dot ENDWITH release oEmailItem,oOutLookObject,pcTekst,pcOnderwerp What's the problem ? I want to attach a file in outlook with a program, my program works but it's only send tekst to Outlook. So I think I need another statement in place of ".body" I need to send files *.msg or Outlook template files. I looked everywhere, burt I can't find a solution. So i will be very pleased if someone could help me. -- huub |
Ads |
#2
|
|||
|
|||
![]()
You must not have used the object browser (F2 in VBA) or Outlook developer Help to look this up. If you had, you would have seen the Attachments collection:
.Attachments.Add c:\myfile.msg, 1 -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "huub van helderen" wrote in message ... My program; #define mailitem 0 oOutLookObject = CreateObject("Outlook.Application") oEmailItem = oOutLookObject.CreateItem(mailitem) WITH oEmailItem ]) .Subject = [TEST] .cc=[ ] .Importance=1 .Body = [ ] ??????? && here i need to attach a file *.msg or *.dot ENDWITH release oEmailItem,oOutLookObject,pcTekst,pcOnderwerp What's the problem ? I want to attach a file in outlook with a program, my program works but it's only send tekst to Outlook. So I think I need another statement in place of ".body" I need to send files *.msg or Outlook template files. I looked everywhere, burt I can't find a solution. So i will be very pleased if someone could help me. -- huub |
#3
|
|||
|
|||
![]()
I,ve seen it, but i don't want to send it as an attatchment but I need a
solution to place a file as contents in the body (JPG MSG or DOT template file), in other words I think I need a statement like .bodyinsert or something like that. Thanks for response -- huub "Sue Mosher [MVP-Outlook]" wrote: You must not have used the object browser (F2 in VBA) or Outlook developer Help to look this up. If you had, you would have seen the Attachments collection: .Attachments.Add c:\myfile.msg, 1 -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "huub van helderen" wrote in message ... My program; #define mailitem 0 oOutLookObject = CreateObject("Outlook.Application") oEmailItem = oOutLookObject.CreateItem(mailitem) WITH oEmailItem ]) .Subject = [TEST] .cc=[ ] .Importance=1 .Body = [ ] ??????? && here i need to attach a file *.msg or *.dot ENDWITH release oEmailItem,oOutLookObject,pcTekst,pcOnderwerp What's the problem ? I want to attach a file in outlook with a program, my program works but it's only send tekst to Outlook. So I think I need another statement in place of ".body" I need to send files *.msg or Outlook template files. I looked everywhere, burt I can't find a solution. So i will be very pleased if someone could help me. -- huub |
#4
|
|||
|
|||
![]()
If you didn't want to send an attachment, then why did you say "I want to attach a file."
The techniques used to insert content from a file into the body of the message vary with the content. For a .jpg image, see http://www.outlookcode.com/d/code/htmlimg.htm. For an .msg file, use the Application.CreateItem from template method. For a .dot Word template, use Word's Application.Documents.Add method to create a new document from the template and then use the technique shown at http://www.outlookcode.com/codedetail.aspx?id=1333 to use that document to create a message body. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "huub van helderen" wrote in message ... I,ve seen it, but i don't want to send it as an attatchment but I need a solution to place a file as contents in the body (JPG MSG or DOT template file), in other words I think I need a statement like .bodyinsert or something like that. Thanks for response -- huub "Sue Mosher [MVP-Outlook]" wrote: You must not have used the object browser (F2 in VBA) or Outlook developer Help to look this up. If you had, you would have seen the Attachments collection: .Attachments.Add c:\myfile.msg, 1 "huub van helderen" wrote in message ... My program; #define mailitem 0 oOutLookObject = CreateObject("Outlook.Application") oEmailItem = oOutLookObject.CreateItem(mailitem) WITH oEmailItem ]) .Subject = [TEST] .cc=[ ] .Importance=1 .Body = [ ] ??????? && here i need to attach a file *.msg or *.dot ENDWITH release oEmailItem,oOutLookObject,pcTekst,pcOnderwerp What's the problem ? I want to attach a file in outlook with a program, my program works but it's only send tekst to Outlook. So I think I need another statement in place of ".body" I need to send files *.msg or Outlook template files. I looked everywhere, burt I can't find a solution. So i will be very pleased if someone could help me. -- huub |
#5
|
|||
|
|||
![]()
Sorry Sue, it must be my poor English, but still I thank you for your help.
-- huub "Sue Mosher [MVP-Outlook]" wrote: If you didn't want to send an attachment, then why did you say "I want to attach a file." The techniques used to insert content from a file into the body of the message vary with the content. For a .jpg image, see http://www.outlookcode.com/d/code/htmlimg.htm. For an .msg file, use the Application.CreateItem from template method. For a .dot Word template, use Word's Application.Documents.Add method to create a new document from the template and then use the technique shown at http://www.outlookcode.com/codedetail.aspx?id=1333 to use that document to create a message body. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "huub van helderen" wrote in message ... I,ve seen it, but i don't want to send it as an attatchment but I need a solution to place a file as contents in the body (JPG MSG or DOT template file), in other words I think I need a statement like .bodyinsert or something like that. Thanks for response -- huub "Sue Mosher [MVP-Outlook]" wrote: You must not have used the object browser (F2 in VBA) or Outlook developer Help to look this up. If you had, you would have seen the Attachments collection: .Attachments.Add c:\myfile.msg, 1 "huub van helderen" wrote in message ... My program; #define mailitem 0 oOutLookObject = CreateObject("Outlook.Application") oEmailItem = oOutLookObject.CreateItem(mailitem) WITH oEmailItem ]) .Subject = [TEST] .cc=[ ] .Importance=1 .Body = [ ] ??????? && here i need to attach a file *.msg or *.dot ENDWITH release oEmailItem,oOutLookObject,pcTekst,pcOnderwerp What's the problem ? I want to attach a file in outlook with a program, my program works but it's only send tekst to Outlook. So I think I need another statement in place of ".body" I need to send files *.msg or Outlook template files. I looked everywhere, burt I can't find a solution. So i will be very pleased if someone could help me. -- huub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot Attach File with Outlook 2007 | Rob Schneider | Outlook - General Queries | 1 | April 7th 07 02:14 PM |
Attach file vs insert file | TOP | Outlook - General Queries | 2 | March 17th 07 01:29 PM |
Outlook 2003 attach file very slow, Pls help! | Ben | Outlook - General Queries | 1 | October 8th 06 08:39 PM |
Problem With File Attach .dat | Tom | Outlook Express | 6 | September 17th 06 12:37 AM |
How do I attach a file as a shortcut? | Christa | Outlook - General Queries | 2 | September 15th 06 10:29 AM |