'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

cdelt1=CDbl(-.00021975)
cdelt2=CDbl(-.00021975)
Set App=GetObject("","Maxim.Application")

Set Max_Doc=App.CurrentDocument

V=Max_Doc.ImageArray

Suc1=Max_Doc.SetFITSKEY("CDELT1",cdelt1)
Suc2=Max_Doc.SetFITSKEY("CDELT2",cdelt2)


