tags:

views:

141

answers:

2

I found this code that is missing the funtion call in thelast line, any ideas on what the save to file command would be?, I'll just kludge it in.

'CODE to SAVE InkPicture to FILE
Dim objInk As MSINKAUTLib.InkPicture
Dim bytArr() As Byte
Dim File1 As String
File1 = "C:\" & TrainerSig & ".gif"
Set objInk = Me.InkPicture2.Object
If objInk.Ink.Strokes.Count > 0 Then
    bytArr = objInk.Ink.Save(2)
    fSaveFile bytArr, File1
End If
A: 

here is a kludgy version of saving inkpicture with VBA code in Access 2007 to a .isf file.

Private Sub Command283_Click() 'CODE to SAVE InkPicture to FILE Dim objInk As MSINKAUTLib.InkPicture Dim bytArr() As Byte Dim File1 As String File1 = "C:\test.isf" Set objInk = Me.InkPicture2.Object If objInk.Ink.Strokes.Count > 0 Then bytArr = objInk.Ink.Save(2) Open File1 For Binary As #1 Put #1, , bytArr Close #1 End If

zaphod23
You answered your own question?
Foole
It's a dirty job, but someone has to do it, I would like additional solutions as well. Now trying to merge ink with background pic
zaphod23
A: 

Thats awesome!

Do you know how to load the image back?

I tried this but got an error with objInk.Load(bytArr), I'm not sure if I'm missing something there or what I'm doing wrong.

Private Sub Form_Load()
Dim objInk As MSINKAUTLib.InkPicture
Dim bytArr() As Byte
Dim File1 As String

File1 = "C:\test.isf"

Set objInk = Me.InkPicture1.Object
    Open File1 For Binary Access Read As #1
    Get #1, , bytArr
    Close #1
    objInk.Ink.Load (bytArr)
End Sub
Marco