| View previous topic :: View next topic |
| Author |
Message |
krism Newbie

Joined: 16 Mar 2006 Posts: 3
|
Posted: Thu Mar 16, 2006 10:56 am Post subject: Online Mailing Labels |
|
|
Hello everyone. I am looking for ideas and/or direction on replicating current MSWord functionality with OpenOffice On our website users can automate mailing label creation by querying against our database on the back end (depending upon what people they want to send flyers to), and invoking MSWord on their computer. It needs specific activeX settings on the browser, but it works pretty well. The original code was pulled from microsoft.com: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q285/1/76.asp&NoWebContent=1
Some of our customers are migrating to openOffice and we would like to be able do the online mail merge with them, too.
Thanks so much for any help!
Kris |
|
| Back to top |
|
 |
krism Newbie

Joined: 16 Mar 2006 Posts: 3
|
Posted: Thu Mar 16, 2006 3:58 pm Post subject: |
|
|
OK, I found some great client side code online to force the OOo file to pop off of a button click of the browser. Is there anyway to force an Avery 5160 Layout onto the page versus a table or plain text?
Set objServiceManager= WScript.CreateObject("com.sun.star.ServiceManager")
Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop")
Dim args()
Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
Set objText= objDocument.getText
Set objCursor= objText.createTextCursor
objText.insertString objCursor, "The first line in the newly created text document." & vbLf, false |
|
| Back to top |
|
 |
krism Newbie

Joined: 16 Mar 2006 Posts: 3
|
Posted: Mon Mar 20, 2006 9:31 am Post subject: online mailing labels |
|
|
Now I have created a template and have it on my C:. It pulls nicely via the client side button click.
set objTemplate= objLabels.loadComponentFromURL("file:///c:/MailLbls2.ott","_blank", 0, args)
Any ideas on how I get text into to label format? I tried getCell, like it was a spreadsheet and it errored. getText just puts text above the label layout.
Thanks!
Kris |
|
| Back to top |
|
 |
|