Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2015, 02:22 AM
staicumihai staicumihai is offline Vba code to save document as pdf using document property text and rename folder. Windows 7 32bit Vba code to save document as pdf using document property text and rename folder. Office 2010 32bit
Advanced Beginner
Vba code to save document as pdf using document property text and rename folder.
 
Join Date: Dec 2015
Posts: 33
staicumihai is on a distinguished road
Default Vba code to save document as pdf using document property text and rename folder.

Hello everyone!



I am using Word 2010 and I have a document with following document property:

Author: Michael Staicu
Title: R6435
Company: ASIG-1234-EXP
Comments: BAAR/MGD/15/RO/03339
Publish date: 12.02.2015


I want to make a macro that automatically modifies the text from given document property fields and does the following:

1. Rename the folder that contains the document as:

R6435_BAAR.MGD.15.RO.03339 Michael Staicu ASIG1234EXP - 12.02.2015

(replacing "/" character from comments propery with "." character and removing "-" character from Company property).


2. Saves my word file with the following name:

R6435_BAAR.MGD.15.RO.03339 Michael Staicu ASIG1234EXP

(replacing "/" character from comments propery with "." character and removing "-" character from Company property).


3. Saves my word file as a pdf with following name:

R6435_BAAR.MGD.15.RO.03339 ASIG1234EXP

(replacing "/" character from comments propery with "." character and removing "-" character from Company property).


Any response I will gratefully appreciate as it saves me from a lot of work
Thanks and I wish you a good day.
Reply With Quote
  #2  
Old 12-21-2015, 07:39 AM
gmayor's Avatar
gmayor gmayor is offline Vba code to save document as pdf using document property text and rename folder. Windows 10 Vba code to save document as pdf using document property text and rename folder. Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Question duplicated (and answered) at http://www.vbaexpress.com/forum/show...-rename-folder

Please cross post duplicated messages to avoid unnecessary duplication of effort.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Tags
filename as document text



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract VBA code to save in Word document Dave T Word VBA 4 01-26-2015 08:41 PM
Document Property Question ksigcajun Word VBA 9 10-14-2014 11:26 AM
creating a new TITLE property from text already within document smndnm Word VBA 6 07-04-2014 08:27 PM
Vba code to save document as pdf using document property text and rename folder. Rename Document & Save d4okeefe Word VBA 4 05-23-2013 09:35 AM
Vba code to save document as pdf using document property text and rename folder. code to save / rename / send attachments unit213 Outlook 1 09-26-2007 08:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:33 PM.


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