Openning Word And Excel To Show Default Docs

Dec 6, 2006

I'm using this code which I think Came from a Button Wizard many moons ago but when I use it It opens the app for the function but does not display the default Blank Doc.

Could anybody point me in the right direction for getting them to show the default blank Docs

Many Thanks

Mick

Private Sub CmdRunWord_Click()
On Error GoTo Err_CmdRunWord_Click

Dim oApp As Object

Set oApp = CreateObject("Word.Application")
oApp.Visible = True
oApp.Caption = "Database Dreams - Word"
Exit_CmdRunWord_Click:
Exit Sub

Err_CmdRunWord_Click:
MsgBox Err.Description
Resume Exit_CmdRunWord_Click

End Sub
Private Sub CmdRunExcel_Click()
On Error GoTo Err_CmdRunExcel_Click

Dim oApp As Object

Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True
oApp.Caption = "Database Dreams - Excel"

Exit_CmdRunExcel_Click:
Exit Sub

Err_CmdRunExcel_Click:
MsgBox Err.Description
Resume Exit_CmdRunExcel_Click

End Sub

View Replies


ADVERTISEMENT

Opening Word Docs From Form

Sep 7, 2005

I have searched this topic but can't find exactly what I'm looking for so I hope someone help.

I have a directory full of doc files which are constantly being updated. I would want to be able to browse the directory from Access and click on the relevant file to open it directly.

So there's no storing the pathnames in a table etc...just open the doc to view.

Any ideas?

Dave Eyley

View 4 Replies View Related

Insert OLE Object (Mainly Word Docs)

Aug 22, 2005

Quick overview so you understand: I have two databases, one which contains form(s) that allow users to enter in legal type cases. It has a subform in which has four fields to insert OLE objects. This form draws its data from a linked table in a database called Attachments. Not all cases have 'attachments' & the attachments are associated to cases by case number.

Anyway, my delima is - I am trying to make a less 'clunky' way for the end-user to insert objects to the cases. Currently, they can click on a button that will open the Insert Object box. It isn't that complex for a developer to use, but the regular end user, it is quite complex. Also, once an object has been inserted, it renames it. (FYI: These objects are being imported & not linked) When inserting the object, you can decide you want it to be an icon shown in the OLE field & thus you can name it there. But the problem is, if you double-click to open the document it gives it a new name that is associated with the form name. It does not retain the original file name. Does anyone know of a way for it to retain the original file name??

That is my 'biggest' problem here since these files maybe updated & even emailed - Being that they are legal documents, it would be good that they retain the name. I have just begun to use OLE objects fields so I am very, very new to this.

View 3 Replies View Related

Adding And Viewing Ms Word Docs

Sep 29, 2005

Hi all,

Just looking for some more advice I am creating an application that contains employee details in access. I have the majority of the database working but I am stuck on a couple of thins, Firstly I would like to add the option to be able to add an employees CV to the databse and an option to open this. I found a good example that I thought would help me and it did in post 11 of the thread below but I cannot get the files to open in MS word so they can be viewed. The majority of the files to be opened will be ms word format. I just get the error object doesnt support this property or method

http://www.access-programmers.co.uk/forums/showthread.php?t=7137&highlight=attaching+files+records

hope someone can help
thanks in advance
J

View 1 Replies View Related

General :: Merge With Word Docs

Apr 4, 2013

I have a access database with 125 names and addresses and need to merge and send out the a doc for each one. Does anyone have experience with the multiple factor of this process. I can merge one but then have to repeat several times.

View 5 Replies View Related

Resizing Bound Object Frames - Inserting Word Docs

Feb 17, 2005

I have created a table with ole object types and linked word documents. I am now trying to create a report with the word documents showing up. The problem is that the size of the word document varies, some are half a page some are several pages. When I create the report with the object frame, I can't seem to find a control property to 'can grow'. Is there some way, possibly using VB, to create that feature. I'm thinking the VB way might be to access the embedded file and find out it's size and then size the object frame accordingly. I don't want to make the frame set to the largest document because then there will be blank pages that I don't want in the smaller documents.

Thanks for any help

View 2 Replies View Related

Openning File

Feb 23, 2007

Hey guys,

If I change the startup properties to not show full menus, how do I get around that to be able to see them again?

View 2 Replies View Related

Openning A Database

May 7, 2007

Hi,


I tried to open an Access database, (.mdb) supplied by a software vendor. When i open it, there is a message popping up saying "This database cannot be directly opened with Microsoft Access, pls use xxx software to view and edit". I believe this message is set by software vendor. When i click ok on this message, Microsoft Access just simply exit. In fact, if i just import this mdb to another mdb, i will be able to view or do editing there.

My question is how is this message is set into the original database and is there a way to remove this message??

View 1 Replies View Related

Openning A Form In Add Mode

Oct 6, 2006

Hi All,


This is such a newbie question I realise, but I have a form (frmFOBEntry) with a combobox (cboMarketCode) which returns a list from tblMarketCode.

New records are added to tblMarketCode using a form frmMarketCode

When I look through the combobox on the first form if the MarketCode I want is not there I want to be able to click a button which will open frmMarketCode in add mode.

Have looked through the forum and found all manner of flash ways to open on to certain records and the like, but nothing that simply opens the form so you can add a new record.

Also, if I add a record will the combobox update automatically?

Many thanks

View 2 Replies View Related

General :: Define Primary Key To Show In Default Value

Feb 10, 2013

I would like to define primary key to show in default value "n/=Right(Year(Date());2)"

n - next real number
=Right(Year(Date());2) - equal two last digits from year

The big problem is when we have next year e.g. 2014 real number should count anew.

E.G 6/13, 7/13, 8/13, 9/13, 1/14

View 3 Replies View Related

Copy Query Design View Into Excel Or Word

Jan 5, 2015

I am trying to copy the design view for queries into either MS Word or Excel. It seems like it should be simple but Access doesn't seem to want to let me copy the table. I have a lot of criteria (and a lot of databases I am working with) and we are auditing our files and creating knowledge preservation documents to make sure no information is lost over time.

I am trying to copy the table that lists everything like below (and in the attached screenshot)

Field
Table
Total
Sort
Show
Criteria

Copy to excel or word.zip

View 4 Replies View Related

Modules & VBA :: Import Excel Into Access With A Default Value

Jun 6, 2014

I'm stuck on a step where I want to import an excel worksheet into the msaccess like we do normally. I do not have any data inside, it's just the header I will be importing. The data will be feeded by other forms based on some selections. My requirement is the "Default value" of each field should be set to 1 as we see in the property of a table in design mode.

The data would be updated later for some fields via macro or commands, but the fields were nor touched should be set to 1 (Value).

View 4 Replies View Related

Need Your Opinion - Store/retrieve Word And Excel Files In Access 2003

Sep 4, 2007

Folks I need your help; just wanted to get your opinions here.

I work in a small engineering group and we have lots of reference documents in word and excel which we typically use for any projects. Currently, all these files are stored in Lotus Notes database. Unfortunately, they are pulling the plug on Notes license starting this fall. Therefore, I have been asked to see if there is a way we can store these files in Access as a repository and query the database whenever we need some information.

In order to avoid the database size getting too big, my thought was to store the .xls/.doc files as an “OLE object” data type, keep the files in local hard drive and create a link in a form to give the user to retrieve the information.

Do any of you have any suggestion on what is the best way to handle this?

Your input is highly appreciated.

Shan.

View 10 Replies View Related

How To Make Checklists And Other Info Docs From 'database' ???

Jan 16, 2007

Non-techy IT type of question...

How to best setup a database (knowledgebase) for use in making various work place hardcopy and electronic intetacive version process checklists that may share some of the same info ?

Eg, checklists for a building dept for how to get permits for different types of buildings that may all require some of the same types of plans and permit application docs, but may also require other plans/docs specific to the particular type of building... but in order to update a requirement in the checklist/s only one database item would need to be changed in order to update all the checklists that include that common item.

Then to carry it one step further... to use the same database to update info publications that may have checklist type information in the narratives about the same building permit requirements.

Hope that makes sense.
Thoughts ?
Where else to look ?

View 4 Replies View Related

Modules & VBA :: Merging PDF Docs Using Access 2007

Apr 1, 2015

Any simple code that merges multiple pdf documents that they are willing to share. I don't seem to be able to find anything that works so far.

View 2 Replies View Related

General :: Ability To Dynamically Update Multiple Docs / Files

May 31, 2013

Lets say we have 100 documents. 30 of these documents contain the same exact set of instructions that i want to update/change. what options would i have that would allow for this 'mass update' so that i can change that specific instruciton and every document with that line would be updated to reflect it?

View 4 Replies View Related

Format Access To Show 0 Like Accounting In Excel

Dec 5, 2006

Is there any format that will allow a 0 to show as a - instead. It would be very useful for the situation that has arisen for me.

View 1 Replies View Related

How To Run An Access Query And Show The Result In Excel?

May 13, 2005

I am writing an Excel VBA code to connect to an Access db and execute an access query. After executing the query, I would like to display the result in the excel spreadsheet.

I was successfully able to make the connection to the access db using the following code:

Set db = OpenDatabase("file name", False, True, "MS Access;PWD=abcd")

However, I do not know what code to use to execute a query named "qrytest" on the Access db and show the result in this Excel file.

Can anyone teach me how to do this please?

P.S. I searched this forum for about 1/2 hour before posting this. Please excuse me if this was addressed anywhere before! Would appreciate a link, if it was.

View 1 Replies View Related

How To Match 4 Character Word Or Number Or Combination By Identical 4 Characters Word

Apr 11, 2013

How to match 4 character word or number or combination by identical 4 characters word or number or combination in one word have 10 or 15 characters.

I have to two separate tables (Table A and Table B). Table A has one column (Tag No) and Table B has about 15 columns with one column name Tag No as below

Table A

Table B

Tag No

Tag No

2009

ZZZ-2030-DC

2010

ZZZ-2010-M9P

[code]....

They're both in MS Access.I am trying to match 2 tables - columns (Tag No) with join query, but not success. I want to match 4 characters in Table-A with 4 similar characters in Table-B (Tag No) cell.What query is suitable to compare two tables.

View 8 Replies View Related

Word :: Sizing MS Word Table To Same Size As Recordset

Aug 14, 2014

My end goal is to populate a pre-existing table in an MS Word document with records from a query. The easiest way I've found (through scouring the internet) is to start with the code below (ran during OnClick() even in Access) to get the table the same size as the recordset:

Code:
Dim wDoc As Word.Document
Dim wTable As Word.Table
Dim wCell As Word.Cell
Set wDoc = appWord.Documents.Add(strDocLoc)
wDoc.Visible = True

[Code] ....

The code will shrink the table down just fine if the table has more rows than the recordset +1 (for header column). My hangup with this is the last line ("Selection.InsertRowsBelow 5") isn't executing; rows are not being added to the table. I get no errors -- it just does nothing. I set it as "Selection.InsertRowsBelow 5" arbitrarily just to see if it would even add rows, and sure enough it's not.

View 9 Replies View Related

Default Combo Box Based On Default Table Value

Feb 13, 2006

Hi Everyone,

I hope someone can help.

I have a form with a combo boxes and a table with relevant list and additional field, fldDefaultDrive (Yes/No Field).

Currently in order to set the default value, I have used the following code for each default;

Private Sub Form_Load()
Forms!frmMediaLabeller!CboDriveName.DefaultValue = """D"""

End Sub

However, I want users to be able to go into the table and change the default value if thier CD player default Drive is anything but D: Drive. I have tried to replace the D above with an SQL statement but with no success.

Private Sub Form_Load()

Dim Drivename As String

Drivename = SELECT tblMediaDrive.fldDrivename FROM tblMediaDrive WHERE (((tblMediaDrive.fldDefaultDrive)=-1));

Forms!frmMediaLabeller!CboDriveName.DefaultValue = """Drivename"""

End Sub

This is definetly not working, can anybody help, I have a feeling it is syntax but not sure where? :confused:

Robert88

View 7 Replies View Related

User Defined Show/No Show Query Results

Jul 5, 2005

I have a parameter query built and am curious if anyone knows of a good way to allow the user to define which fields are displayed in the query results.

i tried looking for other threads discussing this without any luck.. not sure if it was my search terms or what. thanks so much for any help..

View 10 Replies View Related

How Do I Show Convert Vertical Entries To Show Horizontally

Jun 7, 2007

Is it possible to convert fields listed down to show across.

IDNo Code Position
AAA B01 1
AAA C01 2
AAA D01 3
AAA E01 4

I want to show it as
IDNo Code Code Code Code
AAA B01 C01 D01 E01

Is this possible using Access 2003?

View 7 Replies View Related

Query To Show Show Different Results From Same Group

Jun 11, 2006

I wondered if someone could help.

I have 3 columns of data within a table and from a select query am trying to seperate certain groups.

Table 1

yr period valuehome

2006 0 100
2006 0 10
2006 1 1000
2006 1 800
2006 2 60
2006 2 50
2006 3 40
2006 3 10
2006 3 5
2006 3 70
2006 4 50
2006 4 5

I wish to show both results for period 0 and an accumulative total for periods 1-4

so results would be

year period Total sum

2006 0 110
2006 1-4 2090

Can anyone help?

thanks

Paul

View 5 Replies View Related

Reports :: Show Detail - Using Section Header As Hyperlink To Show / Hide Detail

Aug 13, 2013

I'm trying to create a report where I can use a section header as a hyperlink to show/hide detail, but only for that section. For example, my customer names are:

Code:
ABC Co.
ZYX Co.
123 Co.

If I click on ZYX Co., I want it to show the contracts for ONLY that customer:

Code:
ABC Co.
ZYX Co.
Contract 1
Contract 2
123 Co.

Right now, my code looks like this for On_Click:

Code:
If Me.Detail.Visible = False Then
Me.Detail.Visible = True
Else
Me.Detail.Visible = False
End If

But it shows and hides detail for ALL customers when I do this. Is there a way to only show/hide for the customer on which I click?

View 1 Replies View Related

Push Data From Current Record In Form Into A New Excel File, Using Excel Template

Sep 10, 2007

I searched the archive and didn't find quite what I was looking for, so..

I have an Excel 2003 spreadsheet work-in-progress being used as a template (developed by others) to prepare project cost estimates in a complex regulatory environment. We are 'modelling on the fly' for a number of projects until we are comfortable with the estimate model, after which time I intend to incorporate our 'stable' estimate methodology into Access. Meanwhile, I am 'stuck' with the Excel spreadsheet.

I have a project tracking database (Access 2003), and I want to be able to track my estimates. I do NOT want to embed my spreadsheets into the db, just a filelink. There can be more than 1 estimate per project.

Ideally, the user should be able to define a project in the Access db (or select one already defined) and click a 'make estimate' button, which would generate a new Excel file in a predefined directory (based on the present version of the .xlt file), give it an appropriate filename (based on the Access ProjectID and estimate sequence number for that project if there were others already), open up that workbook in Excel, and then autopopulate some cells based on information showing on the original form in Access!

A separate button for 'Open existing estimate' will eventually be required, but I think I could do that if I can get someone to walk me through the steps required above.

I am somewhat familiar with vba in Access, but am an absolute rookie when it comes to excel.

Edit: I left out that I would also add an appropriate record to a table like tblEstimate which would contain the link(s) to the estimate(s). This table will obviously contain a FK to tblProject

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved