| 
    
     |  | すみませんが、私はAutoCADはさっぱりわかりません。 
 ThisDrawing
 がなんなのか?
 Application
 がなんなのか?
 
 わからない以上、不確定な解答しかつけれません。
 
 
 以下不確定な回答
 
 Application.Caption
 
 が取得できるのであれば、それをキーにFindWindow関数でウィンドウハンドル
 が取得できるかも。
 
 Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
 (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
 
 Public Sub addtitle()
 
 Dim LB_Win32ApiResultCode As Long
 Dim hWnd As Long
 
 hWnd = FindWindow(vbNullString, ThisDrawing.Application.Caption)
 If hWnd <> 0 Then
 LB_Win32ApiResultCode = SetWindowText(hWnd, "AutoCAD " & ThisDrawing.GetVariable("cprofile"))
 End If
 
 End Sub
 
 # そもそも、SetWindowTextを使わなくても、文字列を入れることはできないのかなぁと。
 
 これできなければ、私はわかりません。
 Excel VBAの掲示板ですので回答が着くのは期待できないでしょうが。
 
 |  |