|
-
Aug 11th, 2004, 10:26 AM
#1
Thread Starter
New Member
opening acad and acrobat
hi,
i need to know the vb code for opening acad and acrobat files - the following code which i used gives me errors/nothing happens.
Dim EAcad As New AutoCAD.AcadApplication
Dim eAdoc As New AutoCAD.AcadDocument
Set eAdoc = GetObject(filepath)
Set EAcad = eAdoc.Application
and
Dim adb As Acrobat.CAcroAVDoc
adb.Open szFullPath:=filename, szTempTitle:=filename
adb.FindText Text2.Text, 0, 0, 0
thanks.
-
Aug 11th, 2004, 10:30 AM
#2
Thread Starter
New Member
PS
i have referenced acrobat and acad tlb and dll files in the project references - so that is not a problem
-
Aug 11th, 2004, 11:00 AM
#3
Dont you need to create the instance of acrobat too?
VB Code:
Set adb = New Acrobat.CAcroAVDoc
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 11th, 2004, 11:47 AM
#4
Thread Starter
New Member
that did not work...
do u know some website where i could lookup about opening autocad and acrobat files in vb
thanks
-
Aug 11th, 2004, 11:13 PM
#5
I know you can sign up for a membership with Adobe for free, but
its limited unless you want to upgrade to the full featured one for
some $$. They have samples and a SDK for Acrobat. I have used
it but on the Acrobat end and a little on the vb end. Check out
Adobe's site for Acrobat. My own basic code. Cant verify anymore
because I dont have Acrobat installed on my new system.
VB Code:
Option Explicit
'Add reference to acrobat 5.0
'Add one command button
'Add one commondialog control
Dim oApp As Acrobat.CAcroApp
Private Sub Form_Load()
Set oApp = CreateObject("AcroExch.App")
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Not oApp Is Nothing Then
oApp.Exit
End If
Set oApp = Nothing
End Sub
Private Sub Command1_Click()
Dim pdfDoc As Acrobat.CAcroPDDoc
Dim sPath As String
'Path to an existing pdf document
CommonDialog1.ShowOpen
sPath = CommonDialog1.FileName
Set pdfDoc = CreateObject("AcroExch.PDDoc")
If pdfDoc.Open(sPath) Then
'...
Else
'...
Endif
End Sub
HTH
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|