'Example of How to Obtain the current document in Maxim and Mess around with it.  I.e.
'write into the fits header and obtain the image array

Dim Max_Doc
Dim App
Dim Suc1
Dim crota1,crota2

crota1=CDbl(0)
crota2=CDbl(0)
Set App=GetObject("","Maxim.Application")

Set Max_Doc=App.CurrentDocument

V=Max_Doc.ImageArray

Suc1=Max_Doc.SetFITSKEY("CROTA1",crota1)
Suc2=Max_Doc.SetFITSKEY("CROTA2",crota2)


