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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Createobject and pictogram

Status
Not open for further replies.

Flippertje

Technical User
Mar 12, 2004
118
NL
Hello all,

i've build a code that will attach a file using notesui.
The attachingcode:

call uidoc.createobject("Tezzt", ,"C:\testfile.doc")
This way the complete document is placed in the form i'm using. I know it's possible to turn this document in a pictogram thus not showing the complete document.

Does anyone know how this is done?

grtz Flippertje!
 
If you want an icon, you should try attaching to the doc instead of embedding.

Pascal.
 
Hi Pmonnet,

i didn't use embed (i think..) I created an object. When i do this manually i have an option that changes the (word)object to a pictogram in stead of showing the full document. That is what i'm trying to do in VBA...

grtz Flippertje

This is my code:

============================================

dim workspace
dim uidoc
dim bestand9 as string

bestandje="H:\meldingkje.doc"

set workspace=createobject("Notes.NotesUIWorkspace")
set uidoc=workspace.composedocument("servername","databasename","nameofNewNotesDocument")

call uidoc.gotofield ("Fieldname where Attachment will be put")
uidoc.editmode=true
call uidoc.createobject("TestOpject", , bestandje)

set workspace=nothing
set uidoc=nothing
============================================


Many thanks for your trouble!!!


 
Indeed, you are creating an object, which means you are embedding, not attaching (in NotesSpeak).
I think you should try to use a createobject method instead. That would most probably give you the icon you want.

Pascal.
 
I'm a superdeluxe beginner at this so this is a dumm question... but what should i try to change to createobject?

Many thanks already!

grtz Flippertje
 
You will need a NotesRichTextItem and you will probably need to create it on the NotesDocument object - at least, that is the way to do it LotusScript.
Once you have your NotesDocument and RTitem objects, then you use the EmbedObject method of the RTitem class (embeddedObject.EMBED_ATTACHMENT for Java).

That should sort you out.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top