Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateObject to Attachment Object conversion

Status
Not open for further replies.
Sep 2, 2002
32
DE
Hi everybody,

I wrote some code as shown below, which allows a user to create an embedded word document from a file, this works fine. But I've been asked if I can change this so that it's an attachment instead, anybody now how I can change this code to do that.

Thanks

Matt

Dim uiw As New NotesUIWorkSpace
Dim wordobj As Variant, handle As Variant, csz As String
Dim app As Variant
Dim uid As NotesUIDocument
Set uid = uiw.CurrentDocument
Call uid.GotoField("letter")

Call uid.CreateObject("Word Document","","mypath")
Set handle = uid.GetObject ("Word Document")
Call handle.activate
Set app = handle.Application

Call app.ActiveDocument.Bookmarks("supplier"). _Range.InsertAfter((uid.FieldGetText("supplier")))
 
Do you want to make it an attachment after it's been embedded ?
 
Yes that's right, because my users want to simply click on an attachment to view it, instead of having to view an embedded document. But I did it this way, so that I could put data into the word document.
 
Well, unless anyone has a better idea, you'll have to do it the hard way. That means that the only way I can think of to switch an embedded object to an attachment is to save it to disk, remove it from the document, then attach it as an attachment.
It would be simpler to have users write up their info in Word or Excel and have them attach it instead of embedding it, no ?

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top