Macro for inserting a files selected from a directory (on a networ

I'm looking for a macro that I could add to .dotm so that I can insert 
selected files into my main document:

From the document > click on a toolbar icon > open the correct specific 
folder to display the list of files in that folder > Select a file to insert 
it into my main document.

The reason for going this way is to let people change the word files but 
keep them out of playing with Quick Parts/Autoext in the template itself as 
files might change and the list of files int eh folder might be added to.

I had one I found on this community which worked on my home PC but I seem to 
be
struggling with it at work on the network. Getting to the folder was OK but 
I struggled to get it to insert the file as it kept looking at my C drive.

Can anyone help me?  

Thanks
0
Utf
6/3/2010 12:17:33 AM
word.vba.general 1023 articles. 1 followers. Follow

2 Replies
1712 Views

Similar Articles

[PageSpeed] 45

Show us the code that you are trying to use.

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Marley" <Marley@discussions.microsoft.com> wrote in message 
news:28938D38-1DE4-495D-9D3E-08CB26FF6720@microsoft.com...
> I'm looking for a macro that I could add to .dotm so that I can insert
> selected files into my main document:
>
> From the document > click on a toolbar icon > open the correct specific
> folder to display the list of files in that folder > Select a file to 
> insert
> it into my main document.
>
> The reason for going this way is to let people change the word files but
> keep them out of playing with Quick Parts/Autoext in the template itself 
> as
> files might change and the list of files int eh folder might be added to.
>
> I had one I found on this community which worked on my home PC but I seem 
> to
> be
> struggling with it at work on the network. Getting to the folder was OK 
> but
> I struggled to get it to insert the file as it kept looking at my C drive.
>
> Can anyone help me?
>
> Thanks 

0
Doug
6/3/2010 1:20:45 AM
See http://www.gmayor.com/Boiler.htm

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"Marley" <Marley@discussions.microsoft.com> wrote in message 
news:28938D38-1DE4-495D-9D3E-08CB26FF6720@microsoft.com...
> I'm looking for a macro that I could add to .dotm so that I can insert
> selected files into my main document:
>
> From the document > click on a toolbar icon > open the correct specific
> folder to display the list of files in that folder > Select a file to 
> insert
> it into my main document.
>
> The reason for going this way is to let people change the word files but
> keep them out of playing with Quick Parts/Autoext in the template itself 
> as
> files might change and the list of files int eh folder might be added to.
>
> I had one I found on this community which worked on my home PC but I seem 
> to
> be
> struggling with it at work on the network. Getting to the folder was OK 
> but
> I struggled to get it to insert the file as it kept looking at my C drive.
>
> Can anyone help me?
>
> Thanks 


0
Graham
6/3/2010 4:51:09 AM
Reply:

Similar Artilces:

Excedl 2003 / How to automize file opening
Hello Everyone below, my issue with excel 2003: When opening my "mainfile.xls", I wish it could open others "datafileS.xls", needed for my calculation within "mainfile.xls". All files are located in the same directory. a. mainfile.xls b. datafile1.xls c. datafile2.xls d. datafile3.xls In "mainfile.xls", I do use function such as INDIRECT("Datafile1.xls.....), to calculate various figures using my data files. My main problem is that if all my "datafileS.xls" are not opened when launching "mainfile.xls", this one cannot ret...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

Locating a file in excel with a partial file name. #2
I have been runnimg with Office 2000 with which when I go to open a file in excel I am able to enter a partial file name, any part of the file name, to search for the file I wish to open. I am finding in Excel 2002 this function does not apprear to exsit, only the function where it will search for the fille that starts with what your typing will appear once its narrowed it down to the first of a few possible options. I require the ability to be able to just go to the file open icon in excel and on the file name line be able to typr the last few chararacters of a file name to find the ...

Best way to play Video files on an Access form?
Hello, My client has an Access front end with an SQL Server back end that will be storing Videos. The client wants to play those videos on an Access form. I know I can use Windows Media Player, but just wondering if anyone has experience doing this that has some insight on what the best way to handle this is. I know Media Player can be a bit of a pig, so if there is a better solution, I would love to hear it. Thanks! Rico ...

when inserting a chart excel is saying i cannot add any new fonts
When I attempt to insert a chart i am getting a message which says,"no new fonts may be added to this workbook". I am adding it to a billing process and I did the first 100 or so before it began this doing this, I am not adding any new fonts but I am getting this message, any suggestions on what is the cause so I can overcome it? I've described the problem and fix here: Error: "No more new fonts may be applied in this workbook" http://peltiertech.com/Excel/Charts/FixFonts.html - Jon ------- Jon Peltier Peltier Technical Services, Inc. http://peltier...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

Convert old PPT file
My company recently upgrade the office 2003 to office 2007. It works well for most of the users except one. He had thousands of old powerpoint slides which created around year 1996,1997. By using right click to check the file properties, it shows the the application name is 'Microsoft Powerpoint 4.0' .These file can be opened by powerpoint 2003 but can not being opened by powerpoint 2007. Does anyone have idea how I can bulk convert those files to powerpoint 2003 format? Thanks James Steve has a macro here http://www.pptfaq.com/FAQ00740.htm -- john ATSIGN PPTAl...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

generating .csv file
Hi, Is there any process (Code) to generate .csv files to all entities in MSCRM at a time. regards, sailaja. I think you are not clear with question. 1. You can export data to .csv file or excel file from any entity 2. You can export customization to .xml file which are enttities list etc. -- Regards, Imran MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat with me on MSN / Gmail / Skype : ID Is :.. mscrmexpert@gmail.com "sailaja.crm@gmail.com" wrote: > Hi, > Is there any process (Code) to generate .csv files to all entities in > MSCRM at a ...

inserting a picture
hi I need your expertise regarding inserting a picture in word 2007. When I hit the office button and go to open then my pictures, pick the picture i want and then click open. After that it brings up the convert file dialogue box and i cant bring up the picture. Can you help me with this problem? Thank you , Joe. Hi, I am not that sure why that problem is happening but i believe that it is having problem importing pictures that are in another format. I want to know a few things: Where did you get the picture? What is its file extension? Make sure that your pictu...

Problem importing Eudora mail files
System is running XP Pro / Outlook 2002 SP-2. Trying to import mail files from Eudora lite 5.2. The address book info came over fine, but Outlook 2002 cannot seem to read the Eudora mail files. Keep getting an error message "Cannot access application files. Please check to be sure that program is not being accessed by other applications." ...

encoding wmv file
hello I have a sample application developed in MFC dialog based project using directx sdk 9. the sample captures video from a webcam and saves it to a wmv file now i have to put that video into streaming server. i beleive that i will have to encode the wmv file using some codecs to put it into streaming server. i want to do the capturing and encoding simultaneously. below is a portion of my code to capture video // capture video pBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, // Pin category &MEDIATYPE_Video, // Media type p...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

Graphics Insert into Publisher Doc.
When ever I insert a graphic into my publisher docs. they appear as a series of dashes around the perimeter of the graphic & across the diagonals of the graphic not the actual graphic I am trying to work with. Can anyone advise of a fix as this is driving me insane. Regards, Longa Do you have detailed display enabled? View, pictures, detailed display... Otherwise you may need to update your graphics/video driver. Slide the acceleration down on your adapter, control panel, display folder, settings tab, advanced button, troubleshoot tab. If your images appear, then go to the manufacturer...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

How to Use One PST file on Two Computers?
Hello: I have a desktop machine with a pst file in my Outlook 2003. I would like to copy this pst file to my laptop. How do I synchronize the same file on 2 machines so I won't get duplicate e-mails? I use one premium Yahoo e-mail account and several free Yahoo accounts with YahooPOPs.. Thanks in advance, Spudy Hi Spudy, it is not possible by default to share PST files. A list of a list of third-party synctools are also on this site: http://www.slipstick.com/outlook/sync.htm On the Microsoft Office Marketplace site is a list of third-party messaging tools: http://office.microsoft.com...

File location?
Where are the aspx files stored? http://site/subsite/list/defautl.aspx where would i find that? the reason i ask is when i go to export there are a couple of files that im told access denied. not sure why since im the admin on all levels. Thanks Justin Well, that really depends... mostly your stuff is stored in SQL, which means that its really data in a table cell. However, depending on whether a page has been customized or not it could be pointing to definition files that are stored on the Web Front End servers, and you really want to leave those alone. Furthermore, th...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

Importing a pst file in Outlook XP
My computer's configuration changed and I had to delete some hard disk partitions. After doing that, when I open Outlook it pops up a window saying "Unable to open your default e-mail folders. The file F:\{...}\outlook .pst could not be opened". Then I press OK and then a new pop-up says "Would you like to open your default File System folder instead?" If I press Yes, Outlook opens without (of course) the outlook.pst file. Also, I can't import my pst file neither I can Create a new one. If I press No, Outlook closes. Does anyone know how to open my pst fil...

File In Use
I am trying to open an excel program that is shared on a network drive. When I go to open it the following message box pops up.... File In Use name.xls is locked for editing by 'user name'. open by 'read only' or click 'notify' to open read-only and receive notification when the document is no longer in use. The user name that it is saying is me and I don't have the file open. Does anyone know why it is saying this or how to fix it? I guess it thinks I have the file open, maybe it didn't close right but I can't figure it out. Thanks Dave ma...

Unable to Open a backup file (Money 2004) on a new computer
Though I am computer savvy, MS Money is driving me crazy. Last year I have installed Money 2004 on my laptop and used it once a month to download transactions. Everytime I close money, I get a new file created on my hard disk with the name "My Money Backup ++.mbf", where + indicates a number. I always open the latest .mbf file to access the information. Now I have purchased a new laptop and installed Money 2004 on that as well. I have copied the latest .mbf file from my old laptop onto a diskette and tried to open it from the new laptop in vain. Whatever I do, I get stuc...

Cannot insert new rows
I am running excel 2007 and I have 23 worksheets in a workbook. I have no links or hidden rows or colums. My biggest sheet is A1: AW8096. I use VB macros to add lines and move data from one set of workbooks to this one. I have built several sheets using this proceedure. All of a sudden I get the error "Cannot shift objects off sheet" when I run a routine I have 50,000 times. I have checked to make sure there are no hidden comments, row or columns. I have deleted most of the worksheets and I still get the error. I have made copies of the workbook and used different file ...

Item Quantity List does not select any records
I use the item quantity list for restocking purposes. However when I select a single department and select qty to order > 0 the report does not show any records. It appears this only happens when I make a selection by department (and then select the department in question). Removing the department selection shows the products to be re-ordered. Same happens when I just select the department in question but do NOT select qty to order > 0. Anybody ran into the same problem and has a solution for me? I would like to use the selection in order to reduce the number of pages to the prod...

Data files
What is the difference between the **.mbf and **.mny files? In microsoft.public.money, duhmel wrote: >What is the difference between the **.mbf and **.mny files? > *.mbf is Money Backup File. You cannot do salv.exe or standard repair directly to a *.mbf file. ...