Jump to content
Sign in to follow this  
Dio

Printing a word-document

Recommended Posts

Dio

Hey people!

$Text=_RTFCreateDocument($Font) $Textblock=_RTFAppendString($Text,_ArrayToString($MonatZSummeArray,""),$FontColour,$Fontsize,$FontStyle,$Font) 
$hFormatErgebnisDatei=FileOpen("MonateErgebnisDatei.doc",1);öffnet/erstellt ein Worddokument und legt das Handle in der Var $FormatErgebnisDatei ab
FileWriteLine($hFormatErgebnisDatei,$Textblock)
$oFormatErgebnisDatei=_WordAttach("MonateErgebnisDatei.doc","FileName")
if @error Then
    MsgBox(0,"",@error)
EndIf
$FormatErgebnisDatei=_WordDocGetCollection($oFormatErgebnisDatei,0)
_WordDocPrint($FormatErgebnisDatei,0,1,0,0,$ListboxText)
_WordDocClose($FormatErgebnisDatei)

I get Error 7 all the time. What's my mistake?

Greetz

Dio

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.