Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-13-2017, 04:53 AM
jajukhan jajukhan is offline Newbie - Help - VBA script Windows 8 Newbie - Help - VBA script Office 2010 32bit
Novice
Newbie - Help - VBA script
 
Join Date: Sep 2017
Posts: 1
jajukhan is on a distinguished road
Question Newbie - Help - VBA script

Hi,
I am a newbie and was hoping for some help. I have an existing word 2010 document, what I would like to do is get people to either accept or reject (i.e. Click Yes or No) to my Terms & Conditions before opening that Word document.

I have used the below code as a test and it works great. But now instead of a pop up box. I need something slightly bigger where I can show the entire Terms & Conditions statement.



What I have in mind is, a pop-up form/box that shows the entire T&C statement but with a scroll bar so that users are not overwhelmed with a load of text. Then, simply click Yes or No.

Thanks in advance.
Aj


The code is used and adapted is below:
Private Sub Document_Open()

Dim wdApp As Word.Application
Set wdApp = GetObject(, "Word.Application")

Dim TermsConditions As String

TermsConditions = MsgBox("Greetings", vbYesNo, "Greetings")

If (TermsConditions = vbYes) Then
Exit Sub

ElseIf (TermsConditions = vbNo) Then
wdApp.ActiveDocument.Close


End If


End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script Template __John__ Word 0 06-24-2016 02:41 PM
Newbie - Help - VBA script Outlook VBA Script kcm5153 Outlook 1 04-07-2015 11:41 PM
Bolding in script ksigcajun Word VBA 10 02-23-2015 08:29 AM
Help with VBA script nsyrax Word VBA 1 01-18-2014 03:38 AM
[ask] about VB Script + Ms. Project anak_baru Project 2 03-10-2009 01:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:40 AM.


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