Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AppleScript VB change in Mac Office 2011

Featured Replies

The following script works fine with MacOS 10.6 and Mac Word 2004.

 

My client has moved to MacOS 10.8 and Mac Word 2011 and the script is not working.

Can anyone suggest what is required to be changed?

 

I have tried changing 'do Visual Basic' to 'run VB macro macro name' but that wasn't the whole answer.

 

 

"tell application "FileMaker Pro"¶

tell database "ContactSystem"¶

tell table "ContactSystem"¶

set user_name to cell "ExportMyName"¶

set user_fullname to cell "ExportMyFullName"¶

set user_position to cell "ExportMyPosition"¶

set user_phone to cell "ExportMyPhone"¶

set user_fax to cell "ExportMyFax"¶

set user_email to cell "ExportMyEmail"¶

set policy_commission to cell "ExportPolicyCommission"¶

set system_reference to cell "ExportReference"¶

set client_code to cell "CurrentClient"¶

set contact_title to cell "ExportContactTitle"¶

set contact_first to cell "ExportContactFirst"¶

set contact_last to cell "ExportContactLast"¶

set contact_position to cell "ExportContactPosition"¶

set contact_address1 to cell "ExportContactAddress1"¶

set contact_suburb to cell "ExportContactSuburb"¶

set contact_state to cell "ExportContactState"¶

set contact_pcode to cell "ExportContactPCode"¶

set contact_phone to cell "ExportContactPhone"¶

set contact_fax to cell "ExportContactFax"¶

set contact_email to cell "ExportContactEmail"¶

set contact_company to cell "ExportContactCompany"¶

set create_date to the day of (the current date) & " " & the month of (the current date) & ", " & the year of (the current date) as string¶

set create_time to the time string of (the current date) as string¶

end tell¶

end tell¶

end tell¶

ReplaceWordText("<MyName>", user_name)¶

ReplaceWordText("<MyFullName>", user_fullname)¶

ReplaceWordText("<MyPosition>", user_position)¶

ReplaceWordText("<MyPhone>", user_phone)¶

ReplaceWordText("<MyFax>", user_fax)¶

ReplaceWordText("<MyEmail>", user_email)¶

ReplaceWordText("<SystemReference>", system_reference)¶

ReplaceWordText("<ClientCode>", client_code)¶

ReplaceWordText("<ContactTitle>", contact_title)¶

ReplaceWordText("<ContactFirst>", contact_first)¶

ReplaceWordText("<ContactLast>", contact_last)¶

ReplaceWordText("<ContactPosition>", contact_position)¶

ReplaceWordText("<ContactAddress1>", contact_address1)¶

ReplaceWordText("<ContactSuburb>", contact_suburb)¶

ReplaceWordText("<ContactState>", contact_state)¶

ReplaceWordText("<ContactPCode>", contact_pcode)¶

ReplaceWordText("<ContactPhone>", contact_phone)¶

ReplaceWordText("<ContactFax>", contact_fax)¶

ReplaceWordText("<ContactEmail>", contact_email)¶

ReplaceWordText("<ContactCompany>", contact_company)¶

ReplaceWordText("<CreateDate>", create_date)¶

ReplaceWordText("<CreateTime>", create_time)¶

ReplaceWordText("<PolicyInvoiceCommission>", policy_commission)¶

on ReplaceWordText(FindText, ReplaceText)¶

  tell application "Microsoft Word"¶

    do Visual Basic "  With Selection.Find¶

    .Text = "" & FindText & ""¶

    .Replacement.Text = "" & ReplaceText & ""¶

    .Forward = True¶

    .Wrap = wdFindContinue¶

  End With "¶

     do Visual Basic " Selection.Find.Execute Replace:=wdReplaceAll"¶

  end tell¶

end ReplaceWordText"

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.