Problem solve Get help with specific problems with your technologies, process and projects.

123 file shows blank in a frame

I've written the code below to open an existing 123 file from an action button atop a Notes form. It writes to the 123 file and saves/closes, but when you look at 123 you can't see the file (only see a blank 123 frame)! Who'd have thought? How do I get this 123 file to become visible?

thanks for taking a look.

 Sub Click(Source As Button) Dim w123 As Variant Dim r As Variant Set w123 = GetObject("c:bmcphee.123", "Lotus123.Workbook.98") Set r = w123.Ranges("A:A1..A:B10") r.Cell(0, 0, 0).Contents = "Hello 123, you infernal OLE Application." w123.Application.Visible = True Messagebox "Close 123" w123.Application.QUIT End Sub

Here's the code I've come up with that works. Functionally, it's identical to yours, except I was having some problems with the GetObject function - it would keep opening up 123 without a file (similar to your problem). So, I decided to open 123 through a CreateObject function call, then tell 123 to go open the file.

The next problem was the Ranges. I don't know why, but I couldn't get it to plop any text into the range specified, so I dug up some sample code from lotus and changed the property being changed (they were doing the background color) to Contents, then put in your comment. Now it works fine!

I added the code to save at the end just to prove a point to myself. No user interaction is required - if you keep the application object invisible, the user will never know it went to 123.

There is a downside here, it takes 123 a pretty good length of time to save the document (don't know why), so you might want to keep that in mind, if you DO want to do anything in the background with 123.

Here's the modified code - I ran it from a button in a mail document, but it should work from anywhere that it's called from the UI (action buttons, hotspot buttons, etc):

 Sub Click(Source As Button) Dim w123 As Variant Dim wb As Variant 'Dim r As Variant Set w123 = CreateObject("Lotus123.Workbook") w123.Application.Visible = True Set wb = w123.Application.OpenDocument("c:tempbmcphee.123") wb.Ranges("A:A1..A:B10").Contents = "Hello, 123 you infernal OLE Application." wb.Save w123.Application.Quit 'Set r = w123.Ranges("A:A1..A:B10") 'r.Cell(0, 0, 0).Contents = "Hello 123, you infernal OLE Application." 'Messagebox "Close 123" 'w123.Application.QUIT End Sub

This was last published in April 2002

Dig Deeper on Domino Resources - Part 2

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...