VBA Click Specific Button on Other Application

mkron

New Member
Joined
Apr 5, 2017
Messages
18
Hello,

I have created a macro to open a program where drawings are stored. I am trying to open the .pdf file that appears in this program. I need to click on the "View / Print Drawings" button but am not sure how to do this.

I will not be able to just search the folder where the drawings are stored because there are several revs for each drawing.

Any help is greatly appreciated, thanks! Below is the code I have now.

Range("H4").Select
dr = 4
dc = 8

Do Until ActiveCell.Value = ""

dwg = Cells(dr, dc)
dwg = dwg + "*"

Shell ("C:***program_location***")
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Application.SendKeys dwg
Application.SendKeys "~"

ActiveCell.Offset(1, 0).Select
dr = dr + 1

Loop


End Sub


Thanks again.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top