General Discussion | Post Scripting – Launch Office programs

Group Admins

No Admins

General Discussion

Public Group active 1 week ago ago

Discuss machining and other topics with other BobCAD users.

Post Scripting – Launch Office programs (2 posts)

← Group Forum   Group Forum Directory
  • Profile picture of cheezewiz cheezewiz said 10 months, 3 weeks ago ago:

    Did you know that you can use VBScript in your post to launch other programs on your computer? The methods vary and I’m still learning them myself but I’ve pieced together a couple different methods to accomplish this, customized for the BobCAD posting engine. There is no credit due here, it’s fairly easy just to make them open. The trick is getting them to do something useful.

    Here is a small code snippet you can try in your own post. Just paste this at the end of your post after all the scripting blocks:

    2101. Read entire file after post.

    '****** MS Excel Call

    ' Create The Excel Application Object.
    Set objExcel = CreateObject("Excel.Application")

    ' Make Excel Visible Through The Application Object.
    objExcel.Visible = True

    ' Set The Application Object To Allow Data To Be Added.
    objExcel.Workbooks.Add

    ' Sets Row 2 Of The Spreadsheet For The Data Because Row 1 Contains The Header Info.
    intRow = 2

    ' Sets The Column Name As "Machine Name" To Cell A1.
    objExcel.Cells(1, 1).Value = "Machine Name"

    Ok, I don’t have MS Office installed on this Laptop yet. Let me try to load it to make sure this works.

  • Profile picture of cheezewiz cheezewiz said 10 months, 3 weeks ago ago:

    Ok, it will probably work if you have a paid version of Office. I installed the Office “Starter” Edition and it refuses to launch the Excel object. There might be another way to make it work but I don’t use MS anyway. Later today I will post the method for how to launch “Open Office” Cal program. I know that works because I use it often.


Protected

2013-05-23 09:08:33