Link to home
Start Free TrialLog in
Avatar of hreinart
hreinart

asked on

Hw to print a notes memo with all attachments togehter at once?

hi,

in the end i want to fax a notes memo with an attachment.

unfortunatelly this faxsoftware doesn't support attachment printing.

to fax e.g. a word document, i can use "print" in any application (like word...) to print it on a fax printer driver.

question:
now i need something that i can press a button "print" and then the notes memo should be printed and also all attachment(s).
if you'd print this to a normal printer you should receive 1 page for the notes memo (assuming the memo is 1 page) and 1 extra page for e.g. a word document.

for testing you could also print to an acrobat pdf file. in this case you should get 1 file including 1 page of the notes memo and one page of the word document.


hope it's clear what i need?
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Yep, it's clear. Go to www.notestopaper.com and read all about their product, all about high quality printing from Notes. They are in Fulda (D).
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hreinart
hreinart

ASKER

hi,

it looks quite well.
just to mention, i changed the click event to:
Sub Click(Source As Button)
      Dim workspace As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Set uidoc = workspace.CurrentDocument
      Set doc = uidoc.Document
      Call uidoc.print                          <- new line
      Call PrintAllAttachments(doc)
End Sub

...to print also the memo itself.


i found 2 things i'd need to have changed:

1) a memo with e.g. 2 tiff files will not be printed correctly.
    the memo and 1st tiff is printed well, 2nd and other tiff files aren't printed.
    error: no file extension.
    the error popup contains also a message in the "blue" headline
    unable to print file .....\datatempATTn8636L


2) is there any chance that the memo and all attachments are printed in 1 print-stream?
    reason:
    as written i want to send this print stream in the end to a fax. if receiving e.g. 3 streams i
    create 3 seperate faxes.



thanks
hreinart
1. datatempATTn8636L indicates a generated file by notes... this is done if you attach two identical file names . To make it unique notes changes the file name and thus losing the real information of the file.

2. The print stream cannot be multiple. When it comes from a doc based the print job is single and cannot be multiple... Unless you develop a method like extracting the attachments and then issue print for each attachment seperately.. I haven't tried this but a thought.

reg. #1 you're right. the mail included 3 identical files.

regarding #2 could you do this?
is this big work?

I am not sure about #2 it is just a theory and it is a bigger scope than what you have asked for...
... i could ask for if i should initiate it.
would you be able to do this?
Sorry I haven't got time.. leaving right now and will be back only night.. and back to work from tomorrow.


any other time you could have a look at?
Hemantha, I know someone who always desperately needs points. I missed him in this question...

Sjef ;)

PS Sorry, before you ask me: I don't want to code this.
Sjef,
Are you not pointing to me right????
Madheeswar! The very idea! Now, are you insinuating that I'm insinuating? Preposterous.

But anyway, since you're here now, what's your opinion?

Sjef :D
I saw in some post, you have commented, I will give code for 500 points.
So, if it is no me, then it should be Arun or it should be Ranjeet(don't get offended/serious).

And regarding this,
I am out of complex coding. this may take lot of resource to write program. And I don't have readymade code.

Jef, why can't you try. or you would be having some resource for the required code.
Don't worry, Hreinart will increase this points to 500.
Well it used to be Arunkumar who was always in need of points :-)

To solve your problem with the file extensions, you need to make sure the file names are unique or get the filenames through C API. Unfortunately this isn't that straight-forward as LotusScript and I don't have the time to look into that for the moment.
If you look at the attachment properties in UI you can see the original file name, so it must be possible to retrieve it using the C API. Maybe somebody has done it before?
I was just kidding, just trying to find out who's watching this question ;)

Sorry, it's almost a rent-a-coder job. As you say, it might take a lot of resources to get it all done. I do have a lot of resource, but not for free. Coding advice is (in EE) for free, very little else. The points are nice, but not adequate for this type of development. If Hreinart would start himself and post the code for our comments? Or just the strategy? WOuld that be an idea?
About the attachment name: it can easily be found in LotusScript in the Source attribute. When you save to disk, modify the name of the file on disk to accomodate for multiple attachments with the same name.
Hm,
I've tested with the source and name property of an attachment.
If the attachment was added manually, both return the notes generated file name and not the original.
Strange. The Source property never failed me for an embedded attachment, not even when manually attached.
It's only when the two attachments have an identical name that there are problems. In this case notes will generate an internal unique name and this will be returned by both name and source property.
If file names are different for all attachments everything is OK.
Ah, gotcha. I'll try (some sunny day, but not today). Thanks.
hi,

back from work i see your postings.

you're right the error occured by printing 2 idential attachments in the memo.
i think that this reason was posted before.

regarding the coding.
i see that this looks quite complex.
so it is not intended for ee.

i'll have a closer look at it. in case it's really needed, hwo much would it cost?
when could it be delivered?


best regards
hreinart