Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2022, 04:59 PM
Guessed's Avatar
Guessed Guessed is offline I need to edit a macro to open *.Doc and *.Docx files Windows 10 I need to edit a macro to open *.Doc and *.Docx files Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,179
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Paul, why do you think it is important for these source files to become templates? I presume this code is not contained in any of them since it is running before the source file is opened. I also presume that they are creating PDFs (via FinePrint) and not saving the source document in a Word format at all. I would have thought that making all the source files into separate templates makes it problematic to have a single 'attached template' that might contain code or standardised formatting across the suite of documents.

The improvements I would recommend for the code is:
1. Stop nagging with a MsgBox about Fineprint and just use Word's SaveAs to make a PDF (will need to ask what filename and location to save to).
2. Use the FileOpen dialog to allow the user to select the preferred source document and not have to type a part number - this solves the original question and avoids user typing errors. Rather than opening the file with their answer, use it with a Documents.Add method.

And are the search terms in any header/footers because that code is probably not finding those instances.



Rampum15 - is that what you want to achieve?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot open files created in Word/show up as DOCX Alcore Office 4 10-24-2021 02:08 AM
I need to edit a macro to open *.Doc and *.Docx files View and edit docx files in Word 2003 orealius Word 4 03-16-2019 08:11 AM
I need to edit a macro to open *.Doc and *.Docx files I cannot open .docx files even though I have MS Office 2016 syeh11 Word 1 09-14-2015 10:16 PM
How to open Docx files? mond_bees Word 12 08-29-2012 03:32 AM
Office 2007 will not open .docx files Reg1987 Word 1 12-15-2010 11:55 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft