12 Replies Latest reply: Dec 8, 2016 2:50 AM by Tauceef Sheikh RSS

    Macro is not working on Access point

      Hi Everyone,

       

       

      Please help me,

      I am trying to fire macro from the access point but macro is not working , in the server(production) macro is running but when I am trying to fire from the access point macro is not firing. I have downloaded IE pulgins also but still it is not working.

      In QVMC----->server ----> security---> I have tick the Allow unsafe macro for execution on server and Allow macro for execution on server but still macro is firing from the server.

       

       

       

       

      Thanks in Advance.

      Sher Bahadur.

        • Re: Macro is not working on Access point
          Mohit Sharma

          make sure you try this

          ctrl+shift+m

          tick on radio button for give system access to module script

           

          sorry to adjust in this reply

          you have to enable the VBA component in MS-OFFICE.. regarding that..........



            • Re: Macro is not working on Access point

              Hi Er. Mohit

               

              Yes, I had tick on the radio button and provide system access.

              but not working on access point . Is there is any other option which I am missing because I am new in qlikview so please help me.

               

              Thanks for reply Er. Mohit

              • Re: Macro is not working on Access point

                Hi  Er. Mohit

                 

                I have enabled the VBA component but still it is not working on the server.

                  • Re: Macro is not working on Access point
                    Karthikeyan Subramaniam

                    Do you have MS office in server?

                    • Re: Macro is not working on Access point
                      Yaseen Pullissery

                      Hi Sher

                       

                      How the marco is being triggered? Is it based on events?

                       

                      Regards

                      MultiView

                        • Re: Macro is not working on Access point
                          Karthikeyan Subramaniam

                          Use this macro and make sure you have CH01 and CH02 charts available in your report.

                           

                          sub ppt

                           

                           

                          Dim myArray(1)

                          myArray(0) = "CH01" 'add chart or table reference in reverse order of slide

                          myArray(1) = "CH02"

                          Set PPApp = CreateObject("Powerpoint.Application")

                           

                           

                          PPApp.Visible = True ' Create a presentation

                          Set PPPres = PPApp.Presentations.Add

                          For each item in myArray

                          Set PPSlide = PPPres.Slides.Add(1, 1)

                           

                           

                          ActiveDocument.GetSheetObject(item).CopyBitmapToClipboard

                          PPSlide.Shapes(1).Delete ' removes the title

                          PPSlide.Shapes(1).Delete ' removes the text box

                           

                           

                          PPSlide.Shapes.Paste

                          with PPSlide.Shapes(PPSlide.Shapes.Count)

                          .left = 10

                          .top = 80

                          .width=700

                          end with

                           

                           

                          Next

                          PPPres.SaveAs "D:\MyPresentation.ppt"

                          'PPPres.Close

                          'PPApp.Quit

                           

                           

                          Set PPSlide = Nothing

                          Set PPPres = Nothing

                          Set PPApp = Nothing

                           

                           

                           

                           

                          end sub

                            • Re: Macro is not working on Access point

                              Thanks for giving me example but my code is working properly and the problem is my macro is not triggering in access point and on the server it is working well.

                              my code is:

                              SUB Export_to_Microsoft_Word

                              . . . . .

                              . . . .. .

                              . . . .. .

                              set objWord = CreateObject("Word.Application")

                                  objWord.Visible = false

                                  Set objDoc = objWord.Documents.Open(tmpFile & "\standard template.docx")

                              Set objSelection = objWord.Selection

                               

                               

                              set Ad = ActiveDocument.GetSheetObject("TX18")

                              Ad.CopyBitmapToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=1

                              objWord.Selection.Paste

                               

                               

                              set Ad1 = ActiveDocument.GetSheetObject("TX16")

                              Ad1.CopyTextToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=0

                              objWord.Selection.Paste

                               

                               

                              set Ad2 = ActiveDocument.GetSheetObject("TX10")

                              Ad2.CopyBitmapToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=1

                              objWord.Selection.Paste

                               

                               

                              set Ad3 = ActiveDocument.GetSheetObject("CH12")

                              Ad3.CopyBitmapToClipboard

                              objWord.Selection.Paste

                               

                               

                              set Ad4 = ActiveDocument.GetSheetObject("TX12")

                              Ad4.CopyBitmapToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=1

                              objWord.Selection.Paste

                               

                               

                              set Ad5 = ActiveDocument.GetSheetObject("CH26")

                              Ad5.CopyBitmapToClipboard

                              objWord.Selection.Paste

                               

                               

                              set Ad6 = ActiveDocument.GetSheetObject("CH27")

                              Ad6.CopyBitmapToClipboard

                              objWord.Selection.Paste

                               

                               

                              set Ad7 = ActiveDocument.GetSheetObject("CH29")

                              Ad7.CopyBitmapToClipboard

                              objWord.Selection.Paste

                              objWord.Selection.ParagraphFormat.Alignment=1

                               

                               

                              set Ad8 = ActiveDocument.GetSheetObject("TX14")

                              Ad8.CopyBitmapToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=1

                              objWord.Selection.Paste

                               

                               

                              set Ad9 = ActiveDocument.GetSheetObject("CH24")

                              Ad9.CopyBitmapToClipboard

                              objWord.Selection.Paste

                               

                               

                              set Ad10 = ActiveDocument.GetSheetObject("TX13")

                              Ad10.CopyBitmapToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=2

                              objWord.Selection.Paste

                               

                               

                              set Ad11 = ActiveDocument.GetSheetObject("TX15")

                              Ad11.CopyBitmapToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=1

                              objWord.Selection.Paste

                               

                               

                              set Ad12 = ActiveDocument.GetSheetObject("CH23")

                              Ad12.CopyBitmapToClipboard

                              objWord.Selection.Paste

                               

                               

                              set Ad13 = ActiveDocument.GetSheetObject("TX17")

                              Ad13.CopyBitmapToClipboard

                              objWord.Selection.ParagraphFormat.Alignment=1

                              objWord.Selection.Paste

                               

                               

                              objDoc.SaveAs (LogPath  & ".docx")    '// log path is globally declared

                              objDoc.Close

                              objWord.Quit

                              If Err.Number <>0 Then

                                            'Error handling

                                             msgbox("Error desc => " + Err.Description + " <> source => "+ Err.Source)

                                  Err.Clear

                              End If

                              end sub

                            • Re: Macro is not working on Access point

                              yes, here i am trying to export all the Bitmap and charts in ms word.but marco is woking I just put a msgbox() to know it is working or not but it is not working.. please give me some idea..

                              Please the screen shCapture.PNG