Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 2nd, 2007, 10:59 PM
Registered User
 
Join Date: Nov 2007
Location: Glendroa, Ca, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting common dialog to work (re-install)

I am a newbie here but enjoying working with Access very much. My problem is not with coding (yet!) but with referencing "Microsoft Common Dialog Control V.6" I hope I explain this right? From "Access 2003 VBA Programmers Reference I have the following code to open a Word doc:

Private Sub cmdGoodFaithEstimate_Click()
Dim objWordApp As Word.Application
Dim objword As Word.Document
Dim strFilePath As String

Me.cmdlg.dialogtitle = "Choose File Name and Location"
Me.cmdlg.showopen
strFilePath = Me.cmdlg.FileName
DoCmd.OutputTo acOutputReport, "samples", acFormatRTF, strFilePath
Set objWordApp = CreateObject("word.application")
Set objword = objWordApp.Documents.Open(strFilePath)

' Make Word Visable
objword.Application.Visible = True
Set objword = Nothing
Set objWordApp = Nothing

'instantiate the new object as a word object
Set objword = GetObject("M:\MLa Databases\GoodFaith.doc", "Word.Application")


However the "cmdlg" throws out a compile error. If I understand correcty I should reference the object in VBA but its NOT showing up in to check. In Access it shows up as an Active X control, but registering there has no effect. Is this an error in VBA and can I fix it? I have tried most things suggested on the net. with no results.
Thanks in advance:)

Mike
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
coding problem in common dialog box cancertropica Visual Basic 2005 Basics 0 July 30th, 2008 09:38 AM
How to use the flags int common dialog box diegoblin Beginning VB 6 2 November 8th, 2006 03:41 PM
Using common dialog with access azkabancells VB Databases Basics 2 May 14th, 2005 06:01 AM
Storing a file patch from a common dialog box marcin2k Access VBA 2 March 16th, 2005 03:58 PM
Instantiating Common Dialog Box Dhodie Pro VB 6 2 July 19th, 2004 04:28 AM



All times are GMT -4. The time now is 09:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.