Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

ActiveX controls and printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gina K - 06 May 2007 00:32 GMT
I’m using a form with an ActiveX control (Autodesk’s DWG TrueView) to view
AutoCAD drawings.  I can print the drawings directly from my database by
right clicking on the ActiveX control, then selecting File – Plot.  This
opens TrueView’s “print dialog” (not sure if that’s the correct term) so that
I can select the printer, paper size, and plot area.  Is there a way to
automate this so I can just click a command button?

If someone could point me in the right direction I’d really appreciate it.

Thanks.
Stephen Lebans - 06 May 2007 12:41 GMT
Your control exposes a method, probably named Plot. You can easily see what
Methods and Properties the control exposes.
Open any code module.
Right click anywhere in the code window and select Object Browser.
In the Topmost left Combo control which currently shows <All Libraries>
select your ActiveX control's library.

Now you can see all of the components of the library and how to read/write
the Properties and call the Methods of the specific class.

Place code behind your CommandButton like:

Me.NameOfYourActiveXControl.Plot ProbablyAParameterForTheMethodHere

If you are still having trouble, from the Object Browser window copy and
paste the Plot method declaration.
For example, here is the VBA lib MsgBox function.

Function MsgBox(Prompt, [Buttons As VbMsgBoxStyle = vbOKOnly], [Title],
[HelpFile], [Context]) As VbMsgBoxResult
   Member of VBA.Interaction

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> I'm using a form with an ActiveX control (Autodesk's DWG TrueView) to view
> AutoCAD drawings.  I can print the drawings directly from my database by
[quoted text clipped - 7 lines]
>
> Thanks.
Gina K - 06 May 2007 14:54 GMT
Thanks a million - I'm certainly headed in the right direction now!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.