Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-03-2018, 07:45 PM
macropod's Avatar
macropod macropod is offline Specifying a particular path and a timer? Edit: Also adding some cropping code Windows 7 64bit Specifying a particular path and a timer? Edit: Also adding some cropping code Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For the first question, change:
TopLevelFolder = GetFolder
to something like:
TopLevelFolder = "C:\Users" & Environ("Username") & "\Documents"
That will cause the macro to start the search from your 'Documents' folder - you can drill down to a lower folder for the starting point, if you prefer.


Regarding the second question, you can use the Application.OnTime method to run a macro at a specified time or interval. For example:
Code:
Private Sub Document_Open()
Call Main
End Sub
would run the 'main' macro immediately the document is opened. If you were to add:
Code:
Application.OnTime When:=Now + TimeValue("01:00:00"), Name:="Main", Tolerance:=0
to the end of the 'Main' macro, the process would repeat every hour - provided the document remains open.

As for your third question, you could insert:
Code:
      If .InlineShapes.Count > 0 Then
        With .InlineShapes(1).PictureFormat
          .CropBottom = 110
          .CropTop = 165
        End With
      End If
between:
.RemoveDocumentInformation (wdRDIAll)
and:
.Close SaveChanges:=True
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Timer for outlook DuncanH Outlook 0 02-28-2017 08:45 PM
Can you add a count down timer? breakout PowerPoint 0 01-09-2015 10:41 PM
Countdown Timer mcdanita PowerPoint 0 03-08-2012 12:51 PM
Timer in ppt 2007 Dave4500 PowerPoint 0 01-22-2011 06:56 PM
Specifying a particular path and a timer? Edit: Also adding some cropping code first timer papamadre Forum Support 1 10-24-2009 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:37 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