Using COM side effects

OK,

So about 2-3 months ago I posted this link:

http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/267edcda740926c3852572ed00677820?OpenDocument

About a problem printing. I am just getting back to work on this from another project. After some further investigating about what others are doing I decided to use COM and print this from word.

I have that routine working fine, with a couple of minor issues.

Issue # 1:

My Form Graphics don’t show. I have our company logo and some Horizontal Rules in the form which do not move over with the ‘copy and paste’.

Does anyone know if there are other methods I can use to move those ‘nice to haves’ over to the word doc for printing?

Issue # 2:

I can not call the close() method. If I try to call it I get prompted to save the doc. I can not pass in the parameter that the method expects because it is an object type I can not create.

For # 1 my plan is to just remove the graphics and use ASCII art to define sections and breaks etc. However #2 is a small issue as the word documents are remaining resident in memory.

Cheers,

Shawn

Subject: some answers

As for your #1 item, what I would do is build a word template with the graphics and formatting you need. Place bookmarks where you want the text. Then, when you use COM to invoke word, create a new document based off the word template you created. You can add text to bookmark pretty easily.

As for the close method, if you do not save the document, it will always prompt you. so you need to call close using the format of wordhandle.documents.close(0). That should close the file without being prompted or saved.

I regularly speak on Office and Notes integration topics. You can check out my blog at www.johndavidhead.com and download slides and demo databases.

John

Subject: RE: some answers

Thanks John,

That’s exactly what I told one of my colleagues earlier was that those three properties of the wdSaveOptions object had to be simple integers or booleans or something like that.

Appreciate the tip on the word template as well.

Cheers,

Shawn