2010-01-15 46 views
0

我發現這個代碼在最後一行缺少函數調用,關於save to file命令會有什麼想法? ,我就雜牌它。我想使用VBA代碼來保存inkpicture內容,只能使用vb.net或C#

'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 

回答

0

這是在Access 2007中保存.InkPicture用VBA代碼到.isf文件的缺憾版本。

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 
End Sub 
+0

您是否回答了自己的問題? – Foole 2010-01-16 09:47:18

+0

這是一個骯髒的工作,但有人必須這樣做,我想要更多的解決方案。現在嘗試將墨水與背景圖片合併 – zaphod23 2010-01-17 15:58:13