Has anyone run across a method to output a report in native Word format and not Rich Text? I have been tasked to figure out a way to do this and I don't want to reinvent the wheel if I don't have to.
I'm not editing in Word but two of my report fields are embedded OLE objects (Word documents) and I have not found a report control that will resize to accomodate variable length text so I'm planning on building a table in Word and then dump my report data into it.
Go for Automation...
I'm not too experienced in Word programming, but it's VBA after all. You just have to find the methods and properties specific to Word. F1 might prove helpful.
Snapshot is good, but if the images are large, it does not work at all.
It's a clunky two step solution but I would suggest encapsulating a function that first saves the report in rtf format and then via automation invoke Word to import the rtf, save it as a doc file, delete the old rtf and voila you are done! Since you can bring up word invisibly so nobody will see these extra steps. There should be plenty of examples of word automation. To get you started with code for invoking Word I found this example by Dashley elsewhere on Tek-Tips.
Ted
--------------------------------
Open an instance of Word within app
thread222-710628
Public wrdapp As Word.Application
Public wrddoc As Word.Document
Public wrdtbl As Word.Table
Public wrdsel As Word.Selection
Private Sub Command1_Click()
Dim wrdtbl As Table
Set wrdapp = CreateObject("word.application"
Set wrddoc = wrdapp.Documents.Add
Set wrdsel = wrdapp.Selection
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.