SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jan 2007
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    TPHelper Snapshot Issue??!

    Hi All,

    I am new to the forum. I am working on TP 5.6 Build 72.

    Before going in detail, though I am late I want to thank mrtechguy03 for all the contributions to the TP community (They should make you one of the Dir's in Cpwre board of Dir's... or atleast some esop...lol [img]/images/graemlins/grin.gif[/img] )

    And now to the Question...

    I have referenced the TPHelpercommands.dll (Thanks to mrtechguy03...) in TP for saving snapshots in word documents. But every time I call the function it leaves thew winword process running. so if I execute the script ten times there will be ten winword processes running in the background.

    am I missing something here or is it an issue? I am using TP builder ver 1.1.5

    Suggestions:
    1. May be a close snapshot command be included?
    2. Option to change the Font color in the word comments would be useful as people can write the log based on severity and distinguish based on colors... [img]/images/graemlins/grin.gif[/img]

    My Code:

    Private Function WriteLogResults(MsgType As String, bSnapShot As Boolean, strLogMsg As String, bFileType As FileType)

    'Declare Variables for this function
    Dim ss As New SnapShot
    Dim strWriteMsg As String
    Dim strFileType As String

    'Call the Error Handler if any error occurs within the function
    On Error GoTo WriteResults_ErrorHandler


    With ss
    .DocFontName = "lucida sans"
    .DocFontSize = "9"
    .DocHeader = "Proof of Test: " & strScriptName
    .DocHeaderFontName = "lucida sans"
    .DocHeaderFontSize = "14"
    .DocFooterFontName = .DocHeaderFontName
    .DocFooterFontSize = "10"
    End With

    'Form the message string which will be written to the word document
    strWriteMsg = _
    "Message Type : " & MsgType & Chr(10) & _
    "Message Details: " & strLogMsg & Chr(10) & _
    "Snapshot Reqd. : " & bSnapShot & Chr(10)

    If FileExists(strResultsFile) = True And Right(strResultsFile, 4) = ".doc" Then

    ss.DocOpen strResultsFile

    Else

    ss.DocOpen

    End If

    If bSnapShot = True Then
    ss.DocInsertDesktop strWriteMsg
    Else
    ss.DocComment strWriteMsg
    End If

    ss.DocSave strResultsFile


    Exit Function

    WriteResults_ErrorHandler:
    UserCheck "-89 Critical Error", False, "Global_Log: " & Error.Message & " VB: " & Err.Number & " " & Err.Description

    End Function

  2. #2
    Member
    Join Date
    Feb 2007
    Posts
    325
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: TPHelper Snapshot Issue??!

    As far as I know (and I have only used Snapshot a couple of times) but it seems like you can only open the document once and "save" it once. For me once I call the save command the document is close. once I re-open it I think it overrides what is there but I'm not sure. that could be where your problem is.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.11%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:17 PM.

Copyright BetaSoft Inc.